Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
fun mem (x, []) = false
|
||||
| (x eql a, a :: as) = true
|
||||
| (x, _ :: as) = mem (x, as)
|
||||
;
|
||||
fun remdup
|
||||
([], uniq) = rev uniq
|
||||
| (h :: t, uniq) = if mem(h, uniq) then
|
||||
remdup (t, uniq)
|
||||
else
|
||||
remdup (t, h :: uniq)
|
||||
| L = remdup (L, [])
|
||||
|
||||
;
|
||||
println ` implode ` remdup ` explode "the quick brown fox jumped over the lazy dog";
|
||||
println ` remdup [1,2,3,4,4,3,2,1, "dog","cat","dog", 1.1, 2.2, 3.3, 1.1];
|
||||
Loading…
Add table
Add a link
Reference in a new issue