The Enchantments of Elm – writing a roguelike using FRP: Part 1
sridattalabs.com
sridattalabs.com
Nobody likes the tilde-arrow lift syntax! The last line could be rewritten as follows. Does anybody think it's better or worse? I tend to prefer it, though many don't like it.
main = lift2 display Window.dimensions <| lift renderState gameState
main = display <~ Window.dimensions ~ (renderState <~ gameState)
Signals exhibit the characteristics of an applicative functor, after all, so pure functions of any arity can be lifted without needing to think if you're using lift2, lift3, etc.Elm is theoretically classic FRP with a option of a arrow interface, but the combinators for building signal networks is not provided by defult. Therefore I feel its a bit unfair to call it FRP and not having a prefix explaining that its a derivitive there of.
Your observation isn't new, most Elm games' signal graphs have the same shape - a bunch of input signals merged into one, the 'main' loop as a step state, and the drawing code.'
In particular, which kinds of Signal combinators do you feel are lacking?