Interim commit; lots of progress though.

This commit is contained in:
2011-01-18 08:43:30 -08:00
parent 022bdf240b
commit 617e841b05
5 changed files with 210 additions and 162 deletions

View File

@@ -24,7 +24,7 @@ export length(ls :: [a]) :: Int
{
case ls of
[] -> 0
_:rest -> length rest
_:rest -> length(rest)
};
export reverse(ls :: [a]) :: [a]
@@ -32,10 +32,10 @@ export reverse(ls :: [a]) :: [a]
helper(xs,acc) = {
case xs of
[] -> acc
(a:rest) -> helper rest (a:acc)
(a:rest) -> helper(rest, (a:acc))
}
helper ls [];
helper(ls, []);
};
export restrict(Eq a) find(f :: a -> Bool, ls :: [a]) :: Maybe a