doc-src/IsarAdvanced/Codegen/Thy/examples/lookup.ML
changeset 30242 aea5d7fa7ef5
parent 30241 3a1aef73b2b2
parent 30236 e70dae49dc57
child 30244 48543b307e99
child 30251 7aec011818e0
child 30257 06b2d7f9f64b
equal deleted inserted replaced
30241:3a1aef73b2b2 30242:aea5d7fa7ef5
     1 structure ROOT = 
       
     2 struct
       
     3 
       
     4 structure Codegen = 
       
     5 struct
       
     6 
       
     7 fun lookup ((k, v) :: xs) l =
       
     8   (if ((k : string) = l) then SOME v else lookup xs l)
       
     9   | lookup [] l = NONE;
       
    10 
       
    11 end; (*struct Codegen*)
       
    12 
       
    13 end; (*struct ROOT*)