tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,13 @@
|
|||
;;; Initial array
|
||||
lvars ar = {1 2 3 2 3 4};
|
||||
;;; Create a hash table
|
||||
lvars ht= newmapping([], 50, 0, true);
|
||||
;;; Put all array as keys into the hash table
|
||||
lvars i;
|
||||
for i from 1 to length(ar) do
|
||||
1 -> ht(ar(i))
|
||||
endfor;
|
||||
|
||||
;;; Collect keys into a list
|
||||
lvars ls = [];
|
||||
appdata(ht, procedure(x); cons(front(x), ls) -> ls; endprocedure);
|
||||
Loading…
Add table
Add a link
Reference in a new issue