[functional-tests/utils] inc!, dec!

This commit is contained in:
Joe Thornber 2017-08-21 09:59:45 +01:00
parent c921233f3c
commit 80f9d082d5

View File

@ -0,0 +1,16 @@
(library
(utils)
(export inc!
dec!)
(import (rnrs))
(define-syntax inc!
(syntax-rules ()
((_ v) (set! v (+ 1 v)))
((_ v n) (set! v (+ n v)))))
(define-syntax dec!
(syntax-rules ()
((_ v) (set! v (- v 1)))
((_ v n) (set! v (- v n)))))
)