Skip to content

Instantly share code, notes, and snippets.

@isovector
Created February 17, 2016 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isovector/038c248356ccbc97dc45 to your computer and use it in GitHub Desktop.
Save isovector/038c248356ccbc97dc45 to your computer and use it in GitHub Desktop.
module Components.KeySelector where
import Graphics.Input exposing (button)
keySelector : (Note -> a) -> Signal.Address a -> Element
keySelector f address = flow right
<< flip List.map noteEnum.elems
<| \note ->
button (Signal.message address <| f note)
<| toString note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment