Functional Programming MT22, Fold cheatsheet
Flashcards
Can you define (++)
as a fold in Haskell?
(++)
as a fold in Haskell?(++) ;; [a] -> [a] -> [a]
(++) = foldr cons id
where cons x y z = x:(y z)