Created
July 16, 2015 09:33
-
-
Save joshy/877435ae14ab9fbb4005 to your computer and use it in GitHub Desktop.
Mailbox Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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