Created
September 12, 2008 07:45
-
-
Save tarcieri/10401 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # 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