Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. prefixes :: Foldable t => t a -> [[a]]
  2. --prefixes xs = foldr(\x acc -> [[]] ++ map (x:) acc) [[]] xs
  3. --prefixes = foldr(\x acc -> [[]] ++ map (x:) acc) [[]]
  4. --prefixes = foldr(\x -> \acc -> [[]] ++ map (x:) acc) [[]]
  5. --prefixes = foldr(\x -> \acc ->(++) [[]]  (map (x:) acc)) [[]]
  6. --prefixes = foldr(\x -> \acc ->((++) [[]])  (map (x:) acc)) [[]]
  7. --prefixes = foldr(\x -> ((++) [[]]) . \acc -> (map (x:) acc)) [[]]
  8. --prefixes = foldr(\x -> ((++) [[]]) . \acc -> (map (x:)) acc) [[]]
  9. --prefixes = foldr(\x -> ((++) [[]]) . (map (x:)) . \acc ->  acc) [[]]
  10. --prefixes = foldr(\x -> ((++) [[]]) . (map (x:)) . id) [[]]
  11. --prefixes = foldr(\x -> (((++) [[]]) .) (map (x:) . id)) [[]]
  12. --prefixes = foldr(((++) [[]] .) . \x ->(flip (.) id) (map (x:)) ) [[]]
  13. --prefixes = foldr (((++) [[]] .) . (flip (.) id) . \x ->  (map (x:))) [[]]
  14. --prefixes = foldr (((++) [[]] .) . flip (.) id . \x -> map ((:)x)) [[]]
  15.  
  16.  
  17. prefixes = foldr (((++) [[]] .) . flip (.) id . map . (:)) [[]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement