Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -3,7 +3,7 @@ import extensions;
|
|||
|
||||
public program()
|
||||
{
|
||||
var functions := Array.allocate(10).populate:(int i => { ^ i * i} );
|
||||
var functions := Array.allocate(10).populate::(int i => { ^ i * i} );
|
||||
|
||||
functions.forEach:(func) { console.printLine(func()) }
|
||||
functions.forEach::(func) { console.printLine(func()) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
( VL=. (<@:((<'"')(0:`)(,^:)&_))"0@:(^&2)@:i. 10 ) NB. Producing a list of boxed anonymous verbs (functions)
|
||||
┌───┬───┬───┬───┬────┬────┬────┬────┬────┬────┐
|
||||
│0"_│1"_│4"_│9"_│16"_│25"_│36"_│49"_│64"_│81"_│
|
||||
└───┴───┴───┴───┴────┴────┴────┴────┴────┴────┘
|
||||
|
||||
{::&VL 5 NB. Evoking the 6th verb (function)
|
||||
25"_
|
||||
{::&VL 5 '' NB. Invoking the 6th verb with a dummy argument ('')
|
||||
25
|
||||
geni=: {{
|
||||
N=. cocreate''
|
||||
i__N=. y
|
||||
N
|
||||
}}
|
||||
task=: {{ u {{ u {{ u i__n [ y }} (geni y)`'' }}"0 i. y }}
|
||||
|
|
|
|||
7
Task/Closures-Value-capture/J/closures-value-capture-7.j
Normal file
7
Task/Closures-Value-capture/J/closures-value-capture-7.j
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fns=: *: task 10
|
||||
fns@.3 ''
|
||||
9
|
||||
fns@.5 ''
|
||||
25
|
||||
fns@.7 ''
|
||||
49
|
||||
9
Task/Closures-Value-capture/J/closures-value-capture-8.j
Normal file
9
Task/Closures-Value-capture/J/closures-value-capture-8.j
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
( VL=. (<@:((<'"')(0:`)(,^:)&_))"0@:(^&2)@:i. 10 ) NB. Producing a list of boxed anonymous verbs (functions)
|
||||
┌───┬───┬───┬───┬────┬────┬────┬────┬────┬────┐
|
||||
│0"_│1"_│4"_│9"_│16"_│25"_│36"_│49"_│64"_│81"_│
|
||||
└───┴───┴───┴───┴────┴────┴────┴────┴────┴────┘
|
||||
|
||||
{::&VL 5 NB. Evoking the 6th verb (function)
|
||||
25"_
|
||||
{::&VL 5 '' NB. Invoking the 6th verb with a dummy argument ('')
|
||||
25
|
||||
Loading…
Add table
Add a link
Reference in a new issue