doc-src/Tutorial/Misc/Last.thy
author nipkow
Wed, 15 May 2002 13:50:16 +0200
changeset 13153 4b052946b41c
parent 5377 efb799c5ed3c
permissions -rw-r--r--
arith can now deal with div 2 and mod 2.

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