Currently I'm experimenting with elm (so consider me a beginner) and was wondering about the following,
I have defined the following model :
model = foldp update initialModel actions.signal
I understand how foldp
works, it calls my update method to change the initialModel
whenever an action is performed (called from my html buttons etc).
However, now I'm struggling to find out how I can integrate keypresses into this model since foldp
only accepts a single changing signal.
So I would like to get something like this
model = foldp update initialModel (actions.signal + Keyboard.arrows)
I tried to play around with the merge
method but I just can't seem to be able to get it working.
Thanks!