Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Arrays/Standard-ML/arrays.ml
Normal file
11
Task/Arrays/Standard-ML/arrays.ml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(* create first array and assign elements *)
|
||||
-val first = Array.tabulate (10,fn x=>x+10) ;
|
||||
val first = fromList[10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: int array
|
||||
|
||||
(* assign to array 'second' *)
|
||||
-val second=first ;
|
||||
val second = fromList[10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: int array
|
||||
|
||||
(* retrieve 5th element *)
|
||||
-Array.sub(second,4);
|
||||
val it = 14: int
|
||||
Loading…
Add table
Add a link
Reference in a new issue