Last active
December 25, 2016 19:18
-
-
Save pdtwonotes/ec591158d16614c0076808eb4979d11f to your computer and use it in GitHub Desktop.
Multiple calls on an iso
This file contains 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
This convoluted construction works: | |
class Foo | |
var n: USize = 0 | |
new iso create() => None | |
fun iso set_n( m: USize ): Foo iso^ => | |
n = m | |
consume this | |
actor Main | |
new create( env: Env ) => | |
let foo = Foo.create() | |
let foo2 = (consume foo).set_n(3) | |
let foo3 = (consume foo2).set_n(4) | |
let destination = Other.create() | |
destination(consume foo3) | |
actor Other | |
new create() => None | |
be apply( x: Foo iso ) => None | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment