ramda-fantasy icon indicating copy to clipboard operation
ramda-fantasy copied to clipboard

Can`t realize ap composition

Open Ne4to777 opened this issue 5 years ago • 1 comments

Fantasy Land spec: v.ap(u.ap(a.map(f => g => x => f(g(x))))) is equivalent to v.ap(u).ap(a) (composition)

Implementation:

const v = Future.of(x => y => x + y) const u = Future.of(1) const a = Future.of(2)

v .ap(u) .ap(a) .fork(console.error, console.log) // OK

v .ap(u .ap(a .map(f => g => x => f(g(x))))) .fork(console.error, console.log) // TypeError: applyFn is not a function

Ne4to777 avatar Dec 19 '19 15:12 Ne4to777

https://github.com/ramda/ramda-fantasy#project-status

CrossEye avatar Dec 19 '19 18:12 CrossEye