all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
lvars ar = {2 4 3 1 2};
|
||||
;;; Convert array to list.
|
||||
;;; destvector leaves its results and on the pop11 stack + an integer saying how many there were
|
||||
destvector(ar);
|
||||
;;; conslist uses the items left on the stack plus the integer, to make a list of those items.
|
||||
lvars ls = conslist();
|
||||
;;; Sort it
|
||||
sort(ls) -> ls;
|
||||
;;; Convert list to array
|
||||
destlist(ls);
|
||||
consvector() -> ar;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
lvars ar = {2 4 3 1 2};
|
||||
consvector(destlist(sort(conslist(destvector(ar))))) -> ar;
|
||||
;;; print the sorted vector:
|
||||
ar =>
|
||||
** {1 2 2 3 4}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
lvars ar = {2 4 3 1 2};
|
||||
consvector(destlist(sort(datalist(ar)))) -> ar;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
lvars ar = {2 4 3 1 2};
|
||||
ar.datalist.sort.destlist.consvector -> ar;
|
||||
Loading…
Add table
Add a link
Reference in a new issue