Changeset 38573 in project for release/5/box/trunk/srfi-111.scm
- Timestamp:
- 04/06/20 02:59:30 (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
release/5/box/trunk/srfi-111.scm
r38550 r38573 8 8 9 9 (;export 10 box 11 box? 12 unbox 13 set-box! 10 box box? unbox set-box! 14 11 immutable-box) 15 12 … … 19 16 (import (chicken type)) 20 17 (import (only (chicken platform) register-feature!)) 21 (import box-core)18 (import (only box-core box? make-box-mutable make-box-immutable box-ref box-set!)) 22 19 23 ;; ;20 ;; 24 21 25 (define -syntax box26 (syntax-rules ()27 ((box ?arg)28 (make-box-mutable ?arg) ) ))22 (define (box arg) (make-box-mutable arg)) 23 (define (immutable-box arg) (make-box-immutable arg)) 24 (define (unbox box) (box-ref box)) 25 (define (set-box! box val) (box-set! box val)) 29 26 30 (define-syntax immutable-box 31 (syntax-rules () 32 ((immutable-box ?arg) 33 (make-box-immutable ?arg) ) ) ) 34 35 (define-syntax unbox 36 (syntax-rules () 37 ((unbox ?box) 38 (box-ref ?box) ) ) ) 39 40 (define-syntax set-box! 41 (syntax-rules () 42 ((set-box! ?box ?val) 43 (box-set! ?box ?val) ) ) ) 44 45 ;;; 27 ;; 46 28 47 29 (register-feature! 'srfi-111)
Note: See TracChangeset
for help on using the changeset viewer.