doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author haftmann
Tue, 29 Jul 2008 08:15:40 +0200
changeset 27691 ce171cbd4b93
parent 21994 dfa5133dbe73
permissions -rw-r--r--
PureThy: dropped note_thmss_qualified, dropped _i suffix

structure ROOT = 
struct

structure Codegen = 
struct

fun lookup ((k, v) :: xs) l =
  (if ((k : string) = l) then SOME v else lookup xs l)
  | lookup [] l = NONE;

end; (*struct Codegen*)

end; (*struct ROOT*)