Retrieving an Element of an Array: Difference between revisions

m (Moved to Basic learning cat)
Line 233:
 
alias readmyarray { echo -a $array_read(MyArray, 2, 3) }
 
 
 
=={{header|Nial}}==
Nial is an array programming language. Thus it has a variety of ways
to retrieve elements of an (even multi-dimensional) array.
 
Define example one-axis array
myarr := count 6
= 1 2 3 4 5 6
retrieve a specific item
myarr@0
= 1
use pick (pick allows specifying another array as the index for a multidimensional array)
1 pick myarr
= 2
scheme like operations
first myarr
=1
rest myarr
=2 3 4 5 6
front myarr
=1 2 3 4 5
 
There are quite a few others (too large to list here).
 
=={{header|OCaml}}==
418

edits