Skip to content

Instantly share code, notes, and snippets.

@globulon
Created February 15, 2012 21:06
Show Gist options
  • Select an option

  • Save globulon/1839011 to your computer and use it in GitHub Desktop.

Select an option

Save globulon/1839011 to your computer and use it in GitHub Desktop.
State definition
case class State[+T, S](f: (S) => (T,S)) {
def apply(s: S): (T, S) = f(s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment