doc-src/Tutorial/Datatype/assoc
author nipkow
Tue, 08 Oct 2002 08:20:17 +0200
changeset 13630 a013a9dd370f
parent 5851 15ce4c1c8313
permissions -rw-r--r--
Got rid of rotates because of new simplifier

consts   assoc :: "('key * 'val)list => 'key => 'val option"
primrec "assoc [] x = None"
        "assoc (p#ps) x =
           (let (a,b) = p in if a=x then Some b else assoc ps x)"