Add Haskell subSequences (#121)

* Add Haskell Sequence

* Add type signature for the function

* Add aim of sequence.hs program

Co-authored-by: Arsenic <54987647+Arsenic-ATG@users.noreply.github.com>
pull/125/head
Gauravsingh Sisodia 2021-03-30 17:09:02 +05:30 committed by GitHub
parent 098eed7b6c
commit d1c691d684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -34,5 +34,6 @@
### Haskell
1. [Palin Check](haskell/palindrome.hs)
1. [Palindrome Check](haskell/palindrome.hs)
2. [All subsequences](haskell/sequence.hs)

View File

@ -0,0 +1,8 @@
-- 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"