Skip to content

Instantly share code, notes, and snippets.

Roy Mathew roymath

Block or report user

Report or block roymath

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Solutions to C9 Haskell (Chapter 6)
1. Figure out if all values in a list are True
areTrue :: [Bool] -> Bool
areTrue xs = (length [x|x<-xs, x==True]) == length xs
2. Concatenate a list of lists.
concat :: [[a]] -> [a]
concat xss = [x | xs<-xss, x<-xs]
Main.concat [[1,3], [2,4]]
3. Produce a list with n identical elements
You can’t perform that action at this time.