mitch requests
svn: r10795
This commit is contained in:
parent
263feeb124
commit
44cc698c83
|
@ -104,11 +104,11 @@
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(provide always? list-of)
|
(provide always? list-of maybe)
|
||||||
|
|
||||||
(define always?
|
(define always?
|
||||||
(lambda (x) #t))
|
(lambda (x) #t))
|
||||||
|
|
||||||
(define list-of
|
(define list-of
|
||||||
(lambda (pred . l)
|
(lambda (pred . l)
|
||||||
(let ((all-preds (cons pred l)))
|
(let ((all-preds (cons pred l)))
|
||||||
|
@ -125,6 +125,12 @@
|
||||||
((car preds) (mcar obj))
|
((car preds) (mcar obj))
|
||||||
(loop (mcdr obj) (cdr preds))))))))))
|
(loop (mcdr obj) (cdr preds))))))))))
|
||||||
|
|
||||||
|
(define maybe
|
||||||
|
(lambda (pred)
|
||||||
|
(lambda (obj)
|
||||||
|
(or (pred obj)
|
||||||
|
(eqv? obj #f)))))
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(define empty null)
|
(define empty null)
|
||||||
|
@ -134,7 +140,10 @@
|
||||||
empty ;; for constructor-based printing
|
empty ;; for constructor-based printing
|
||||||
trace untrace ;; debugging
|
trace untrace ;; debugging
|
||||||
require module ;; we allow full use of modules
|
require module ;; we allow full use of modules
|
||||||
provide) ;; in case someone wants to use a module
|
provide ;; in case someone wants to use a module
|
||||||
|
make-parameter ;; /
|
||||||
|
parameterize ;; < Mitch asked for these
|
||||||
|
print-struct) ;; \
|
||||||
|
|
||||||
(define-syntax r5rs-out
|
(define-syntax r5rs-out
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user