Frage

I'm trying to understand Elm. I have a bit of experience with Bacon.js, and it seems to me that lift is, basically, Bacon.js's internal map() function renamed.

Is there more to it than that?

War es hilfreich?

Lösung

Sure, that's the same thing. With the lift2..8 functions you can do the same thing that you'd do with Bacon.combineWith.

Signals in Elm (just like Properties in Bacon) are Functors and Applicative Functors, where the former allows you to lift an unary function to the realm of Signals (Elm: lift, Bacon: map, Rx: select), while the latter allows you to lift n-ary functions (Elm: lift2..8, Bacon: combineWith, Rx: combineLatest).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top