I'm trying to introduce a new signal into my program which main function looks like this:
main : Signal Html
main =
Signal.map2 view Window.dimensions model
(more context here)
To design my new signal I'd like to start from this one:
clicks : Signal (Int, Int)
clicks =
Signal.sampleOn Mouse.clicks Mouse.position
I can get this signal:
Signal.map (Debug.log "click") clicks
But, I'm not sure how to integrate this signal into my program such that it will print a debug message on every click.
What's the simplest way to Debug.log
a new signal in an existing Elm program?