take-token   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/core/petri-net.xtm

Implementation

(define take-token (lambda (p)
                     (vector-set! p 1 (- (vector-ref p 1) 1))
                     (>= (vector-ref p 1) 0)))


Back to Index