doc-src/Codegen/Thy/examples/lookup.ML
author haftmann
Thu, 23 Feb 2012 20:33:35 +0100
changeset 46631 2c5c003cee35
parent 30226 2f4684e2ea95
permissions -rw-r--r--
moved lemmas for orderings and lattices on predicates to corresponding theories, retaining declaration order of classical rules; tuned headings; tuned syntax

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