Merge branch 'master' of uhsure.com:webapps/git/bang

This commit is contained in:
2011-01-30 22:16:08 -08:00
6 changed files with 233 additions and 160 deletions

View File

@@ -25,7 +25,7 @@ export length(ls :: [a]) :: Int
{
case ls of
[] -> 0
_:rest -> length rest
_:rest -> length(rest)
};
export reverse(ls :: [a]) :: [a]
@@ -33,10 +33,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