doc-src/Codegen/Thy/examples/lookup.ML
author blanchet
Sun, 04 Mar 2012 23:20:43 +0100
changeset 46818 2a28e66e2e4c
parent 30226 2f4684e2ea95
permissions -rw-r--r--
ensure no abstractions leak through after lambda-lifting (for formulas with higher-order occurrences of quantifiers)

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