doc-src/Tutorial/Misc/Sep.thy
author ballarin
Wed, 10 Dec 2003 14:29:44 +0100
changeset 14287 f630017ed01c
parent 5377 efb799c5ed3c
permissions -rw-r--r--
Isar: where attribute supports instantiation of type variables.

Sep = List +
consts sep :: "'a * 'a list => 'a list"
recdef sep "measure (%(a,xs). length xs)"
    "sep(a, [])     = []"
    "sep(a, [x])    = [x]"
    "sep(a, x#y#zs) = x # a # sep(a,y#zs)"
end