doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
author berghofe
Wed, 07 May 2008 10:56:52 +0200
changeset 26803 0af0f674845d
parent 21994 dfa5133dbe73
permissions -rw-r--r--
- Explicitely passed pred_subset_eq and pred_equals_eq as an argument to the to_set and to_pred attributes, because it is no longer applied automatically - Manually applied predicate1I in proof of accp_subset, because it is no longer part of the claset - Replaced psubset_def by less_le

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