Pergunta

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?

Foi útil?

Solução

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).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top