Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
|
|
@ -0,0 +1,13 @@
|
|||
(mut funcs [])
|
||||
|
||||
(mut i 0)
|
||||
(while (< i 10) {
|
||||
(let ii i)
|
||||
(append! funcs (fun (&ii) (* ii ii)))
|
||||
(set i (+ i 1)) })
|
||||
|
||||
(set i 0)
|
||||
# display the result of all but the last
|
||||
(while (< i 9) {
|
||||
(assert (= ((@ funcs i)) (* i i)) "(@ funcs i) returns (* i i)")
|
||||
(set i (+ 1 i)) })
|
||||
|
|
@ -5,5 +5,5 @@ public program()
|
|||
{
|
||||
var functions := Array.allocate(10).populate::(int i => { ^ i * i} );
|
||||
|
||||
functions.forEach::(func) { console.printLine(func()) }
|
||||
functions.forEach::(func) { Console.printLine(func()) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue