doc-src/Codegen/Thy/examples/lookup.ML
author Walther Neuper <neuper@ist.tugraz.at>
Thu, 12 Aug 2010 15:03:34 +0200
branchisac-from-Isabelle2009-2
changeset 37913 20e3616b2d9c
parent 30209 2f4684e2ea95
permissions -rw-r--r--
prepare reactivation of isac-update-Isa09-2
     1 structure ROOT = 
     2 struct
     3 
     4 structure Codegen = 
     5 struct
     6 
     7 fun lookup ((k, v) :: xs) l =
     8   (if ((k : string) = l) then SOME v else lookup xs l)
     9   | lookup [] l = NONE;
    10 
    11 end; (*struct Codegen*)
    12 
    13 end; (*struct ROOT*)