diff options
Diffstat (limited to 'src/racket_specs/combinators.rkt')
-rw-r--r-- | src/racket_specs/combinators.rkt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/racket_specs/combinators.rkt b/src/racket_specs/combinators.rkt index a74296b..016a44f 100644 --- a/src/racket_specs/combinators.rkt +++ b/src/racket_specs/combinators.rkt @@ -74,5 +74,12 @@ [(< (length l) 2) null] [else (append (list (take l 2)) (consecutive-pairs (drop l 1)))])) +; Mapping helpers + +; (is-map? lst) -> boolean? +(define (is-map? l) + (and (list? l) + (andmap pair? l))) + ; Export procedures -(provide for-all-unique-pairs for-all-consecutive-pairs for-all-elems elem-and not-equal? leq? geq? unique-count?)
\ No newline at end of file +(provide for-all-unique-pairs for-all-consecutive-pairs for-all-elems elem-and not-equal? leq? geq? unique-count? is-map?) |