Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prefixes :: Foldable t => t a -> [[a]]
- --prefixes xs = foldr(\x acc -> [[]] ++ map (x:) acc) [[]] xs
- --prefixes = foldr(\x acc -> [[]] ++ map (x:) acc) [[]]
- --prefixes = foldr(\x -> \acc -> [[]] ++ map (x:) acc) [[]]
- --prefixes = foldr(\x -> \acc ->(++) [[]] (map (x:) acc)) [[]]
- --prefixes = foldr(\x -> \acc ->((++) [[]]) (map (x:) acc)) [[]]
- --prefixes = foldr(\x -> ((++) [[]]) . \acc -> (map (x:) acc)) [[]]
- --prefixes = foldr(\x -> ((++) [[]]) . \acc -> (map (x:)) acc) [[]]
- --prefixes = foldr(\x -> ((++) [[]]) . (map (x:)) . \acc -> acc) [[]]
- --prefixes = foldr(\x -> ((++) [[]]) . (map (x:)) . id) [[]]
- --prefixes = foldr(\x -> (((++) [[]]) .) (map (x:) . id)) [[]]
- --prefixes = foldr(((++) [[]] .) . \x ->(flip (.) id) (map (x:)) ) [[]]
- --prefixes = foldr (((++) [[]] .) . (flip (.) id) . \x -> (map (x:))) [[]]
- --prefixes = foldr (((++) [[]] .) . flip (.) id . \x -> map ((:)x)) [[]]
- prefixes = foldr (((++) [[]] .) . flip (.) id . map . (:)) [[]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement