MostlyAdequate / mostly-adequate-guide

Mostly adequate guide to FP (in javascript)
Other
23.3k stars 1.86k forks source link

fixed Isomorphic JavaScript example #601

Closed dotnetCarpenter closed 3 years ago

dotnetCarpenter commented 3 years ago

Also removed trailing white-space characters.

Before this fix: compose(map(replace('elvis', 'lou'), arrayToMaybe))(x); // Just('lou costello')

const map = curry((fn, f) => f.map(fn));
                               ^
TypeError: f.map is not a function

arrayToMaybe was used as list/array argument to replace. Moving arrayToMaybe to the right of the parenthesis, fixed the example.

KtorZ commented 3 years ago

Also removed trailing white-space characters.

:sob: ... Trailing-spaces have a precise semantic in Markdown. They are there for a reason!

dotnetCarpenter commented 3 years ago

Sorry about banishing trailing spaces - I'll have to teach my editor to not annihilate them.. PR commit coming up