ramda / ramda-fantasy

:ram::sparkles: Fantasy-Land compatible types for easy integration with Ramda.js
MIT License
1.5k stars 95 forks source link

Applicative's ap argument order is reversed #144

Open xvaldetaro opened 7 years ago

xvaldetaro commented 7 years ago

Hi,

I have been studying functional JS from mostly-adequate-guide while always looking here and at fantasy-land to understand the implementation.

After some confusion looking at Apply's signature, I discovered that fantasy-land inverted ap's argument order here.

from: ap :: f (a -> b) -> f a -> fb to: ap :: f a -> f (a -> b) -> f b

However, looking the code here I see that the implementation follows the old signature. Although the new inverted order is opposite of haskell and looks ugly imo, I guess we should follow fantasy-land's specification.