Apanatshka/elm-signal-extra/5.2.1

NOTE: this package is not compatible with Elm 0.19.1

Signal.Fun

Some utility functions for signals of functions. The question is: Why are you dealing with signals of functions? Are you sure you want this? It can be used to harm testability and separation of concerns, which are endangered species and it's illegal to harm them! So please be careful.

scan : a -> SF a a -> Signal a

Takes a starting value for a state; applies each new function coming in to calculate the new state.

premap : (a -> b) -> SF b c -> SF a c

Compose the given function before every function that comes through the signal.

postmap : (c -> d) -> SF b c -> SF b d

Compose the given function after every function that comes through the signal.

bimap : (a -> b) -> (c -> d) -> SF b c -> SF a d

Compose the given functions before and after every function that comes through the signal respectively.