Next: srfi comparators minmax, Previous: srfi comparators compar pred, Up: srfi comparators [Index]
These procedures return #t
or #f
depending on whether an
object is contained in an open, closed, or half–open interval. All
comparisons are done in the sense of comparator, which is
default-comparator
if omitted.
Return #t
if obj1 is less than obj2, which is less
than obj3; otherwise return #f
.
Usage examples:
(import (vicare) (srfi :114)) (define-constant C fixnum-comparator) (in-open-interval? 1 2 3) ⇒ #t (in-open-interval? 1 1 3) ⇒ #f (in-open-interval? 1 3 3) ⇒ #f (in-open-interval? 1 0 3) ⇒ #f (in-open-interval? 1 0 3) ⇒ #f (in-open-interval? 1 0 3) ⇒ #f (in-open-interval? 1 9 3) ⇒ #f (in-open-interval? 1 9 3) ⇒ #f (in-open-interval? 1 9 3) ⇒ #f (in-open-interval? C 1 2 3) ⇒ #t (in-open-interval? C 1 1 3) ⇒ #f (in-open-interval? C 1 3 3) ⇒ #f (in-open-interval? C 1 0 3) ⇒ #f (in-open-interval? C 1 0 3) ⇒ #f (in-open-interval? C 1 0 3) ⇒ #f (in-open-interval? C 1 9 3) ⇒ #f (in-open-interval? C 1 9 3) ⇒ #f (in-open-interval? C 1 9 3) ⇒ #f
Return #t
if obj1 is less than or equal to obj2, which
is less than or equal to obj3; otherwise return #f
.
Usage examples:
(import (vicare) (srfi :114)) (define-constant C fixnum-comparator) (in-closed-interval? 1 2 3) ⇒ #t (in-closed-interval? 1 1 3) ⇒ #t (in-closed-interval? 1 3 3) ⇒ #t (in-closed-interval? 1 0 3) ⇒ #f (in-closed-interval? 1 0 3) ⇒ #f (in-closed-interval? 1 0 3) ⇒ #f (in-closed-interval? 1 9 3) ⇒ #f (in-closed-interval? 1 9 3) ⇒ #f (in-closed-interval? 1 9 3) ⇒ #f (in-closed-interval? C 1 2 3) ⇒ #t (in-closed-interval? C 1 1 3) ⇒ #t (in-closed-interval? C 1 3 3) ⇒ #t (in-closed-interval? C 1 0 3) ⇒ #f (in-closed-interval? C 1 0 3) ⇒ #f (in-closed-interval? C 1 0 3) ⇒ #f (in-closed-interval? C 1 9 3) ⇒ #f (in-closed-interval? C 1 9 3) ⇒ #f (in-closed-interval? C 1 9 3) ⇒ #f
Return #t
if obj1 is less than obj2, which is less
than or equal to obj3; otherwise return #f
.
Usage examples:
(import (vicare) (srfi :114)) (define-constant C fixnum-comparator) (in-open-closed-interval? 1 2 3) ⇒ #t (in-open-closed-interval? 1 1 3) ⇒ #f (in-open-closed-interval? 1 3 3) ⇒ #t (in-open-closed-interval? 1 0 3) ⇒ #f (in-open-closed-interval? 1 0 3) ⇒ #f (in-open-closed-interval? 1 0 3) ⇒ #f (in-open-closed-interval? 1 9 3) ⇒ #f (in-open-closed-interval? 1 9 3) ⇒ #f (in-open-closed-interval? 1 9 3) ⇒ #f (in-open-closed-interval? C 1 2 3) ⇒ #t (in-open-closed-interval? C 1 1 3) ⇒ #f (in-open-closed-interval? C 1 3 3) ⇒ #t (in-open-closed-interval? C 1 0 3) ⇒ #f (in-open-closed-interval? C 1 0 3) ⇒ #f (in-open-closed-interval? C 1 0 3) ⇒ #f (in-open-closed-interval? C 1 9 3) ⇒ #f (in-open-closed-interval? C 1 9 3) ⇒ #f (in-open-closed-interval? C 1 9 3) ⇒ #f
Return #t
if obj1 is less than or equal to obj2, which
is less than obj3; otherwise return #f
.
Usage examples:
(import (vicare) (srfi :114)) (define-constant C fixnum-comparator) (in-closed-open-interval? 1 2 3) ⇒ #t (in-closed-open-interval? 1 1 3) ⇒ #t (in-closed-open-interval? 1 3 3) ⇒ #f (in-closed-open-interval? 1 0 3) ⇒ #f (in-closed-open-interval? 1 0 3) ⇒ #f (in-closed-open-interval? 1 0 3) ⇒ #f (in-closed-open-interval? 1 9 3) ⇒ #f (in-closed-open-interval? 1 9 3) ⇒ #f (in-closed-open-interval? 1 9 3) ⇒ #f (in-closed-open-interval? C 1 2 3) ⇒ #t (in-closed-open-interval? C 1 1 3) ⇒ #t (in-closed-open-interval? C 1 3 3) ⇒ #f (in-closed-open-interval? C 1 0 3) ⇒ #f (in-closed-open-interval? C 1 0 3) ⇒ #f (in-closed-open-interval? C 1 0 3) ⇒ #f (in-closed-open-interval? C 1 9 3) ⇒ #f (in-closed-open-interval? C 1 9 3) ⇒ #f (in-closed-open-interval? C 1 9 3) ⇒ #f
Next: srfi comparators minmax, Previous: srfi comparators compar pred, Up: srfi comparators [Index]