Skip to content

Instantly share code, notes, and snippets.

@pmiddend
Last active October 19, 2015 11:56
Show Gist options
  • Select an option

  • Save pmiddend/86a510b977440594a334 to your computer and use it in GitHub Desktop.

Select an option

Save pmiddend/86a510b977440594a334 to your computer and use it in GitHub Desktop.
-- Vorbedingungen:
--
-- gameover :: Behavior (Behavior Bool)
-- normalPicture :: Behavior (Behavior Picture)
-- gameoverPicture :: Picture -> Behavior Picture
go <- gameover -- go :: Behavior Bool
goEvent <- Control.FRPNow.Lib.when go -- goEvent :: Event ()
goPic <- snapshot normalPicture goEvent -- goPic :: Event (Behavior Picture)
switch normalPicture (gameoverPicture <$> goPic) -- :: Behavior (Behavior Picture)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment