Skip to content

Instantly share code, notes, and snippets.

@darach
Created November 14, 2015 20:30
Show Gist options
  • Save darach/adf4d63263e362da4888 to your computer and use it in GitHub Desktop.
Save darach/adf4d63263e362da4888 to your computer and use it in GitHub Desktop.
ref -> val
actor Main
new create(env : Env) =>
var a : Array[String] ref = [ "a", "b", "c" ]
var b : Array[String] trn = recover Array[String] end
b.push("foo") ; b.push("bar") ; b.push("baz")
for i in a.values() do
b.push(i)
end
let c : Array[String] val = consume b
for i in c.values() do
env.out.print("Got: " + i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment