mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-11 06:57:33 +02:00
Inlining every in (chibi test) to remove SRFI-1 dependency.
This commit is contained in:
parent
41c80d06ca
commit
e2c8f144b5
2 changed files with 11 additions and 2 deletions
|
@ -4,6 +4,16 @@
|
||||||
;;> Simple testing framework adapted from the Chicken @scheme{test}
|
;;> Simple testing framework adapted from the Chicken @scheme{test}
|
||||||
;;> module.
|
;;> module.
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; list utilities
|
||||||
|
|
||||||
|
;; Simplified version of SRFI-1 every.
|
||||||
|
(define (every pred ls)
|
||||||
|
(or (null? ls)
|
||||||
|
(if (null? (cdr ls))
|
||||||
|
(pred (car ls))
|
||||||
|
(if (pred (car ls)) (every1 pred (cdr ls)) #f))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; exception utilities
|
;; exception utilities
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
(scheme write)
|
(scheme write)
|
||||||
(scheme complex)
|
(scheme complex)
|
||||||
(scheme process-context)
|
(scheme process-context)
|
||||||
(scheme time)
|
(scheme time))
|
||||||
(only (srfi 1) every))
|
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chibi
|
(chibi
|
||||||
(import (only (chibi) pair-source print-exception)))
|
(import (only (chibi) pair-source print-exception)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue