Skip to content

Instantly share code, notes, and snippets.

@tarcieri
Created September 12, 2008 07:45
Show Gist options
  • Select an option

  • Save tarcieri/10401 to your computer and use it in GitHub Desktop.

Select an option

Save tarcieri/10401 to your computer and use it in GitHub Desktop.
# Yeah, this doesn't look very impressive, except keep in mind it's
# compiling to Erlang forms, and Erlang has single assignment semantics
# This code now goes through Reia's Static Single Assignment transform,
# which lets you rebind variables by mapping them to versions.
#
# Example (from shell)
# >> Foo.bar(42)
# => 85
module Foo
def bar(n)
n = n * 2
n = n + 1
n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment