Go backward to
E.2.2 Set2
Go up to
E.2 Generic Structured Specifications
Go forward to
E.2.4 List_with_Order
E.2.3 List
spec
List
[
Elem
] =
free
type
List[Elem] ::= nil
|
cons(first:?Elem; rest:?List[Elem])
op
__ ++ __ :
List[Elem]×List[Elem] -> List[Elem],
assoc
,
unit
nil
vars
e:Elem; l,l':List[Elem]
axiom
cons(e,l) ++ l' = cons(e,l ++ l')
op
reverse : List[Elem] -> List[Elem]
axioms
reverse(nil) = nil;
reverse(cons(e,l)) = reverse(l) ++ cons(e,nil)
end
CoFI
Document: CASL/Summary-v1.0 -- Version: 1.0 -- 22 October 1998.
Comments to
cofi-language@brics.dk