Progress
This commit is contained in:
parent
133cc31e77
commit
76b1c55065
2 changed files with 25 additions and 15 deletions
|
|
@ -3,9 +3,14 @@ data forall a. List (a) where {
|
|||
Cons : a -> List (a) -> List (a)
|
||||
};
|
||||
|
||||
length : forall c. List (c) -> Int;
|
||||
length : List (Int) -> Int;
|
||||
length = \list. case list of {
|
||||
Cons x xs => 1 + length xs;
|
||||
-- Nil => 0;
|
||||
-- Cons x (Cons y Nil) => 2;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue