Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
array1=:i. 3 4 NB. a 3 by 4 array with arbitrary values
|
||||
array2=: 5 6 $ 2 NB. a 5 by 6 array where every value is the number 2
|
||||
|
|
@ -0,0 +1 @@
|
|||
array1=: 99 (<0 0)} array1
|
||||
|
|
@ -0,0 +1 @@
|
|||
(<0 0) { array1
|
||||
|
|
@ -0,0 +1 @@
|
|||
array1=: 0
|
||||
|
|
@ -0,0 +1 @@
|
|||
erase'array1'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
task=: verb define
|
||||
assert. y -: 0 0 + , y NB. error except when 2 dimensions are specified
|
||||
INIT=. 0 NB. array will be populated with this value
|
||||
NEW=. 1 NB. we will later update one location with this value
|
||||
ARRAY=. y $ INIT NB. here, we create our 2-dimensional array
|
||||
INDEX=. < ? $ ARRAY NB. pick an arbitrary location within our array
|
||||
ARRAY=. NEW INDEX} ARRAY NB. use our new value at that location
|
||||
INDEX { ARRAY NB. and return the value from that location
|
||||
)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
task 99 99
|
||||
1
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'init new' =. ' ';'x' NB. literals
|
||||
'init new' =. 1r2;2r3 NB. fractions
|
||||
'init new' =. a: ; <<'Rosetta' NB. boxes
|
||||
Loading…
Add table
Add a link
Reference in a new issue