Created
December 5, 2011 03:34
-
-
Save doublec/1432185 to your computer and use it in GitHub Desktop.
ATS version of https://github.com/graydon/rust/issues/1259
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
| fun foo {v:view} (pf: !v | b1: (!v | int) -<cloref> void):void = { | |
| val v = 5 | |
| val () = b1(pf | v) | |
| } | |
| implement main () = { | |
| var x: int? with pf_x | |
| viewdef V = int? @ x | |
| val () = foo {V} (pf_x | lam (pf | newval) => x := newval) | |
| val () = printf("%d\n", @(x)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment