doc-src/Tutorial/Misc/Last.thy
author berghofe
Thu, 20 Dec 2001 14:57:15 +0100
changeset 12555 e6d7f040fdc7
parent 5377 efb799c5ed3c
permissions -rw-r--r--
"code" attribute is now managed by basic code generator module.

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