[e-lang] You can't eat your cake and have it too

Kevin Reid kpreid at mac.com
Sun Jun 10 12:25:46 EDT 2007


def bake(ingredients) {
     var has := null

     def cake {
         to eat() {
             cake.have()
             return ingredients
         }
         to have() {
             return has := def had {
                 match m {
                     require(has == had)
                     E.callWithPair(cake, m)
                 }
             }
         }
     }

     return cake.have()
}

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list