Skip to content

Instantly share code, notes, and snippets.

@joshy
Created July 16, 2015 09:33
Show Gist options
  • Save joshy/877435ae14ab9fbb4005 to your computer and use it in GitHub Desktop.
Save joshy/877435ae14ab9fbb4005 to your computer and use it in GitHub Desktop.
Mailbox Example
import Signal
import Graphics.Element exposing (Element, show)
import Task exposing (Task)
main : Signal Element
main =
Signal.map show contentMailbox.signal
contentMailbox : Signal.Mailbox String
contentMailbox =
Signal.mailbox ""
port updateContent : Task x ()
port updateContent =
Signal.send contentMailbox.address "hello!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment