root/trunk/orca/tests/working/func_closure.r

Revision 1, 248 bytes (checked in by krobillard, 3 years ago)

Import orca & thune.

Line 
1REBOL []
2
3create: func [x] [func [] [x]]
4f: create "ok"
5print f
6
7create: func [x] [func [] [x] x: 2]
8f: create "ok"
9print f
10
11ca: context [
12    gen: func [a b] [
13        does [a + b]
14    ]
15    genA: does [
16        gen 1 2
17    ]
18]
19f: ca/genA
20print f
Note: See TracBrowser for help on using the browser.