doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author chaieb
Wed, 27 Feb 2008 14:39:48 +0100
changeset 26154 894f3860ebfd
parent 21994 dfa5133dbe73
permissions -rw-r--r--
Installation of Quantifier elimination for ordered fields moved to Library/Dense_Linear_Order.thy

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