doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author wenzelm
Tue, 02 Sep 2008 20:04:26 +0200
changeset 28088 723735f2d73a
parent 21994 dfa5133dbe73
permissions -rw-r--r--
* Name bindings in higher specification mechanisms;

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