Created
December 15, 2019 23:47
-
-
Save yasar11732/da6e7462fc584377b5fbd44ccf1ec0ad to your computer and use it in GitHub Desktop.
Real World Haskell CH04 exercises (2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myGroup :: (Eq a) => [a] -> [[a]] | |
myGroup = foldr myMatchMaker [] | |
where myMatchMaker x' ((x:xs):xss) = if x' == x then (x':x:xs):xss else [x']:(x:xs):xss | |
myMatchMaker x' [] = [[x']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment