Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. subseq :: [a] -> [[a]]
  2. subseq [] = []
  3. subseq (x:xs) = map (x :) $ subseq xs
  4.  
  5. Prelude> Control.Monad.filterM (n -> [True, False]) [1,2,3]
  6. [[1,2,3],[1,2],[1,3],[1],[2,3],[2],[3],[]]
Add Comment
Please, Sign In to add comment