doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author haftmann
Wed, 02 Apr 2008 15:58:37 +0200
changeset 26515 4a2063a8c2d2
parent 21994 dfa5133dbe73
permissions -rw-r--r--
extended

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