Add the first post in CS325 series

This commit is contained in:
2019-12-29 22:47:36 -08:00
parent a406fb0846
commit 19aa126025
3 changed files with 269 additions and 43 deletions

View File

@@ -17,4 +17,3 @@ sorted(xs) = sorted(xs[0]) ++ [xs[1]] ++ sorted(xs[2]);
search(xs, k) = |_search(xs, k)| != 0;
insert(xs, k) = _insert(k, _search(xs, k));
_insert(k, xs) = if |xs| == 0 then xs << [] << k << [] else xs