Moduli: implementazione
# module SpecPila: PILA =
struct
type 'a stack = Empty | Push of 'a stack * 'a
let emptystack = Empty
let push p a = Push(p,a)
let pop p = match p with
| Push(p1, _) -> p1
let top p = match p with
| Push(_, a) -> a
end;;
module SpecPila : PILA
Previous slide
Next slide
Back to first slide
View graphic version