bodil / purescript-signal

Elm style FRP library for PureScript
Apache License 2.0
258 stars 44 forks source link

Map effectful functions over signals #61

Closed koterpillar closed 6 years ago

koterpillar commented 7 years ago

It can be useful to apply effectful functions, including asynchronous, to signal values, for example, getting some data using AJAX based on a signal coming from a Flare UI and using the result in the rest of the interface.

This PR adds mapEff and mapAff that can be used to apply Eff and Aff actions to signals to produce new signals. The signatures are aligned for use in Flare which is the main motivation, see liftSF.

CarstenKoenig commented 6 years ago

I updated this for purs 0.12 and it will be in the next release

Thank you !