문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top