This file contains 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
module Main where | |
import Prelude (Unit(), pure, ($), (<$>), bind, show, void, class Functor) | |
import Data.Foldable (mconcat) | |
import Control.Monad.Aff (runAff) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Class (liftEff) | |
import Control.Monad.Eff.Console (CONSOLE(), print) | |
import Control.Monad.Eff.Exception (throwException) | |
import Signal (runSignal) |
This file contains 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
module Main where | |
import Prelude (Unit(), unit, pure, ($), (<$>), (<#>), map, bind, show, void, const, (++), (==)) | |
import Data.Maybe (Maybe(..), fromMaybe) | |
import Data.Either (either) | |
import Data.Array (updateAt, take, drop, findIndex, head, tail, replicate) | |
import Data.Traversable (for) | |
import Data.Functor ((<$)) | |
import Control.Monad.Aff (Aff(), runAff) | |
import Control.Monad.Eff (Eff()) |
This file contains 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
module HelloWorld where | |
import Prelude (Unit()) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Console (CONSOLE(), log) | |
import Signal (constant, (<~), runSignal) | |
main :: forall eff . Eff (console :: CONSOLE | eff) Unit | |
main = runSignal (log <~ constant "Hello, reactive world") |
This file contains 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
module HelloWorld where | |
import Prelude (Unit()) | |
import Data.String (toUpper) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Console (CONSOLE(), log) | |
import Signal (constant, (<~), runSignal) | |
main :: forall eff . Eff (console :: CONSOLE | eff) Unit | |
main = runSignal (log <~ toUpper <~ constant "Hello, reactive world") |
This file contains 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
module MousePos where | |
import Prelude (Unit(), pure, ($), bind, show, void, (++)) | |
import Data.Functor ((<$)) | |
import Control.Monad.Aff (Aff(), runAff) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Exception (throwException) | |
import Control.Monad.Eff.Class (liftEff) | |
import Halogen (HalogenEffects(), ComponentDSL(), Natural(), ComponentHTML(), Component(), action, runUI, component, set) | |
import Halogen.Util (appendToBody, onLoad) |
This file contains 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
module ReactiveTimer where | |
import Prelude (Unit(), (*)) | |
import Data.String (toUpper) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Console (CONSOLE(), print) | |
import Signal (constant, (<~), runSignal) | |
import Signal.Time (every, second) | |
main :: forall eff . Eff (console :: CONSOLE | eff) Unit |
This file contains 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
module FizzBazz where | |
import Prelude (Unit(), (*), const, (++), (+), mod, (/=), (&&)) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Console (CONSOLE(), print, log) | |
import Signal ((<~), runSignal, foldp, filter) | |
import Signal.Time (every, second, delay) | |
main :: forall eff . Eff (console :: CONSOLE | eff) Unit | |
main = fizzbazz |
This file contains 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
module Counter where | |
import Prelude (Unit(), pure, unit, ($), bind, show, void, (++), (+), (*), (<$>), const, negate, id) | |
import Data.Functor ((<$)) | |
import Control.Monad.Aff (Aff(), runAff) | |
import Control.Monad.Eff (Eff()) | |
import Control.Monad.Eff.Exception (throwException) | |
import Control.Monad.Eff.Class (liftEff) | |
import Halogen (HalogenEffects(), ComponentDSL(), Natural(), ComponentHTML(), Component(), action, runUI, component, set) | |
import Halogen.Util (appendToBody, onLoad) |
This file contains 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
module Throttle where | |
import Prelude (Unit(), unit, pure, ($), (<$>), (<#>), bind, void, (++), (==)) | |
import Global (encodeURIComponent) | |
import Data.Maybe (Maybe(..)) | |
import Data.Array ((!!)) | |
import Data.Traversable (for) | |
import Data.Functor ((<$)) | |
import Data.Date (Now(), nowEpochMilliseconds) | |
import Data.Time (Milliseconds(Milliseconds)) |
This file contains 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
module Main where | |
import Control.Alt | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE) | |
import Control.Monad.Aff | |
import Control.Monad.Eff.Exception | |
import Control.Monad.Aff.Console (log, logShow) | |
import Control.Monad.State.Trans | |
import Control.Lazy (fix) |
OlderNewer