Login
7 branches 0 tags
Ben (X13/Arch) Simplified things a little 0643405 9 days ago 1260 Commits
nujel / tests / testsuite / objects.nuj
(2 (-> {:inc! (fn (self) (set! self :v (inc (ref self :v)))) :v 0} :inc! :inc! (ref :v)))
(2 (do (def proto {:inc! (fn (self) (set! self :v (inc (ref self :v))))})
       (def o {:v 0 :prototype* proto})
     (:inc! o)
     (:inc! o)
     (ref o :v)))
(2 (do (def proto { :set! (fn (self v) (set! self :v v))
                     :inc! (fn (self) (:set! self (inc (ref self :v))))})
        (def o {:v 0 :prototype* proto})
      (:inc! o)
      (:inc! o)
      (ref o :v)))
(110 (do (def proto { :set! (fn (self v) (set! self :v v))
                     :inc! (fn (self) (:set! self (inc (ref self :v))))})
        (def o { :v 0
                 :prototype* proto
                 :set! (fn (self v) (set! self :v (* v 10)))})
      (:inc! o)
      (:inc! o)
      (ref o :v)))