I frequently find myself wishing that you could use internal
definitions in cond without introducing additional indentation, for
example something like:

(define (fun-for-list l)
  (cond
    [(empty? l) ...]
    (define fst (first l))
    [(even? fst) ...]
    [(odd? fst) ...]))

rather than

(define (fun-for-list l)
  (cond
    [(empty? l) ...]
    [else
       (define fst (first l))
       (cond
          [(even? fst) ...]
          [(odd? fst) ...])]))
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to