doc-src/Codegen/Thy/examples/lookup.ML
author wenzelm
Sat, 28 Aug 2010 15:25:32 +0200
changeset 38839 be9dace0ff58
parent 30226 2f4684e2ea95
permissions -rw-r--r--
non-critical output primitives -- depending on thread-safe TextIO, while races wrt. flushing should not matter;

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