mostly-adequate-guide
mostly-adequate-guide copied to clipboard
Ch13: thingDownFlipAndReverse
// thingDownFlipAndReverse :: Endo [String] -> [String]
const thingDownFlipAndReverse = fold(Endo(() => []), [Endo(reverse), Endo(sort), Endo(append('thing down')])
- it's missing a right bracket.
- since fold is a reduce, one would expect the first parameter to be
Endo.empty()
which isEndo(identity)
and not Endo with a function returning an empty array.
+1 here. Replace Endo(()=>[])
with Endo.empty()