matchingSub

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-- | List the sub-sequences of conscutives elements in the list such that the
    sum of the element is equal to the given number.

    Examples:

    >>> matchingSub 10 [1..5]
    [[1,2,3,4]]

    >>> matchingSub 2 $ replicate 3 1
    [[1,1],[1,1]]

    >>> take 2 $ matchingSub 2 $ repeat 1
    [[1,1],[1,1]]
--}
matchingSub :: Int -> [Int] -> [[Int]]
matchingSub = undefined