DSA/algorithms/Haskell/strings/sequence.hs

9 lines
224 B
Haskell
Raw Normal View History

-- program to generate all subsequences of a sequence
import Control.Monad (filterM)
findSubSequences :: String -> [String]
findSubSequences = filterM $ const [True, False]
main = traverse print $ findSubSequences "abc"