Skip to content

Instantly share code, notes, and snippets.

@pmiddend
Created October 19, 2015 11:58
Show Gist options
  • Save pmiddend/1aebea62f37e2cdd24b6 to your computer and use it in GitHub Desktop.
Save pmiddend/1aebea62f37e2cdd24b6 to your computer and use it in GitHub Desktop.
-- Vorbedingungen:
--
-- gameover :: Behavior Bool
-- normalPicture :: Behavior (Behavior Picture)
-- gameoverPicture :: Picture -> Behavior Picture
go <- gameover -- go :: Behavior Bool
goEvent <- Control.FRPNow.Lib.when go -- goEvent :: Event ()
normalPic <- normalPicture -- normalPic :: Behavior Picture
goPic <- snapshot normalPic goEvent -- goPic :: Event Picture
switch normalPic (gameoverPicture <$> goPic) -- Behavior Picture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment