mostly-adequate-guide icon indicating copy to clipboard operation
mostly-adequate-guide copied to clipboard

Ch13: thingDownFlipAndReverse

Open antonklimov opened this issue 4 years ago • 1 comments

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

antonklimov avatar Aug 02 '20 23:08 antonklimov

+1 here. Replace Endo(()=>[]) with Endo.empty()

marko911 avatar Dec 11 '20 12:12 marko911