doc-src/Tutorial/Datatype/assoc
author paulson
Tue, 22 Aug 2000 10:59:15 +0200
changeset 9675 0fe0dce56bd8
parent 5851 15ce4c1c8313
permissions -rw-r--r--
updated to latest versions of ttbox and ttbreak

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)"