doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author wenzelm
Fri, 12 Dec 2008 22:13:13 +0100
changeset 29090 bbfac5fd8d78
parent 21994 dfa5133dbe73
permissions -rw-r--r--
global_qed: refrain from ProofContext.auto_bind_facts, to avoid polluting the final result context with bindings involving loose free variables;

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