ans' m (a:as) =
   if m < a
   then Nothing
   else if m == a
        then Just [a]
        else if a' /= Nothing
             then a' >>= (cons a)
             else b'
   where
        a' = ans' (m-a) as
        b' = ans' m as
ans' m (a:as) =
   if m < a
   then Nothing
   else if m == a
        then Just [a]
        else if a' /= Nothing
             then a' >>= (cons a)
             else b'
   where
        a' = ans' (m-a) as
        b' = ans' m as
ans' m (a:as) =
   if m < a
   then Nothing
   else if m == a
        then Just [a]
        else if a' /= Nothing
             then a' >>= (cons a)
             else b'
   where
        a' = ans' (m-a) as
        b' = ans' m as