first implementation of new lambda lifting
This commit is contained in:
parent
70c283ac64
commit
15dad22a0a
5 changed files with 411 additions and 215 deletions
|
|
@ -34,6 +34,14 @@ myData.each do (x: int):
|
|||
|
||||
#OUT 2 4 6 8 10
|
||||
|
||||
type
|
||||
ITest = tuple[
|
||||
setter: proc(v: Int),
|
||||
getter: proc(): int]
|
||||
|
||||
|
||||
proc getInterf(): ITest =
|
||||
var shared: int
|
||||
|
||||
return (setter: proc (x) = shared = x,
|
||||
getter: proc (): int = return shared)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue