diff --git a/examples/distinct.janet b/examples/distinct.janet new file mode 100644 index 0000000..efd6983 --- /dev/null +++ b/examples/distinct.janet @@ -0,0 +1,8 @@ +(distinct @[1 2 3 2 1]) # -> @[1 2 3] + +(distinct [1 2 3 2 1]) # -> @[1 2 3] + +(distinct "bookkeeper") # -> @[98 111 107 101 112 114] + +(sort (map string/from-bytes + (distinct "bookkeeper"))) # -> @["b" "e" "k" "o" "p" "r"] \ No newline at end of file