Skip to content

Instantly share code, notes, and snippets.

@LukaJCB
Last active February 9, 2017 13:21
Show Gist options
  • Save LukaJCB/24fb8e73fff359f60fbb9f5e253d9c92 to your computer and use it in GitHub Desktop.
Save LukaJCB/24fb8e73fff359f60fbb9f5e253d9c92 to your computer and use it in GitHub Desktop.
module Main where
import OutWatch
import Builder ((<==))
import Control.Monad.Eff (Eff)
import Prelude (Unit, map, (#), (+))
import RxJS.Observable (interval, startWith)
main :: Eff () Unit
main = let
seconds = interval 1000
# map (_ + 1)
# startWith 0
root = div [text "Seconds elapsed: ", child <== seconds]
in do render "#app" root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment