Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created March 21, 2015 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightfold/d865e3377dc843f9975c to your computer and use it in GitHub Desktop.
Save rightfold/d865e3377dc843f9975c to your computer and use it in GitHub Desktop.
func map(xs, f)
throw from f
{
let mutable result := list(); // exception thrown here is not OK
for x in xs { // exception thrown here is not OK
result := result :+ // exception thrown here is not OK
f(x); // exception thrown here is OK
} // exception thrown here is not OK
result; // exception thrown here is not OK
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment