Commit 0aab8a5e authored by Pietro Abate's avatar Pietro Abate
Browse files

Add small cduce program with polymorphic functions

parent d05c1abe
type T = <a>[`$A*];;
let fun f ( <a>l : T ) : Int = aux l;;
let fun aux ([`$A*] -> Int)
| [] -> 0
| (x,r) -> (aux r);;
let a = f <a>[ 10 15 20 ];;
let b = f <a>[ 'a' 'b' 'c' ];;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment