1
Chain = List +
2
consts chain :: "('a => 'a => bool) * 'a list => bool"
3
recdef chain "measure (%(r,xs). length xs)"
4
"chain(r, []) = True"
5
"chain(r, [x]) = True"
6
"chain(r, x#y#zs) = (r x y & chain(r, y#zs))"
7
end