diff options
| -rw-r--r-- | theories/Init/Datatypes.v | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/theories/Init/Datatypes.v b/theories/Init/Datatypes.v index 78d0110ae7..fc64f081bc 100644 --- a/theories/Init/Datatypes.v +++ b/theories/Init/Datatypes.v @@ -250,7 +250,8 @@ Bind Scope list_scope with list. Local Open Scope list_scope. -Fixpoint length (A : Type) (l:list A) : nat := +Definition length (A : Type) : list A -> nat := + fix length l := match l with | nil => O | _ :: l' => S (length l') @@ -258,7 +259,8 @@ Fixpoint length (A : Type) (l:list A) : nat := (** Concatenation of two lists *) -Fixpoint app (A : Type) (l m:list A) : list A := +Definition app (A : Type) : list A -> list A -> list A := + fix app l m := match l with | nil => m | a :: l1 => a :: app l1 m |
