Skip to content

Instantly share code, notes, and snippets.

View rupertlssmith's full-sized avatar

Rupert Smith rupertlssmith

  • The Sett Ltd.
  • Edinburgh, Scotland.
View GitHub Profile
@rupertlssmith
rupertlssmith / GameState.elm
Last active October 9, 2024 09:35
Exploring State Machines with phantom types in Elm
module GameState
exposing
( Game(..)
, GameDefinition
, PlayState
, loading
, updateGameDefinition
, updatePlayState
, updateScore
, toReady
@rupertlssmith
rupertlssmith / StateModel.elm
Last active January 11, 2018 16:19
Experimenting with state machines in Elm
module StateModel
exposing
( boolToMaybe
, (>&&>)
, (>||>)
, defaultTransition
, mapWhenCompose
)
import Maybe exposing (andThen)