doc-src/Codegen/Thy/examples/lookup.ML
author wenzelm
Sun, 08 Mar 2009 15:01:10 +0100
changeset 30358 f7fea73b97a6
parent 30226 2f4684e2ea95
permissions -rw-r--r--
index_ML: removed spurious writeln introduced in 41ce4f5c97c9 -- it merely produces unreadable LaTeX sources;

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