PasteRack.org
Paste # 10869
2020-10-04 09:31:29

Fork as a new paste.

Paste viewed 336 times.


Embed:

#lang racket

(define (length-between/c min max)
  (define (predicate? v)
    (define len (length v))
    (<= min len max))
  (define name (string->symbol (format "list-length-beteween-~v-and-~v" min max)))
  (flat-named-contract name predicate?))