1

I need to use do this

input =
Signal.sampleOn delta <|
  Signal.map7 Key
    Keyboard.arrows
    (checknumcode '1')
    (checknumcode '2')
    (checknumcode '3')
    (checknumcode '4')
    (checknumcode '5')
    delta

but Signal do not have map7 How can I implement it?

SwordW
  • 592
  • 2
  • 6
  • 20

2 Answers2

2

If you are using the 2.1.0 version of the core package, you could use the Fancy Mapping (<~) and (~) operators that you find in the Signal package. From version 3.0 these functions are not in the core anymore, you can find them in the Signal Extra package

You could find here another explanation on how to use these operators

Your function would become something like

Key <~ Keyboard.arrows
    ~ (checknumcode '1')
    ~ (checknumcode '2')
    ~ (checknumcode '3')
    ~ (checknumcode '4')
    ~ (checknumcode '5')
    ~ delta
marcosh
  • 8,780
  • 5
  • 44
  • 74
0

I just merge some of the signal and use map3

SwordW
  • 592
  • 2
  • 6
  • 20