conjoin and disjoin Rutger van Beusekom (30 Mar 2026 09:50 UTC)
Re: conjoin and disjoin Arthur A. Gleckler (30 Mar 2026 21:31 UTC)
Re: conjoin and disjoin Peter McGoron (30 Mar 2026 21:47 UTC)
Re: conjoin and disjoin Arthur A. Gleckler (30 Mar 2026 21:50 UTC)
Re: conjoin and disjoin John Cowan (02 Apr 2026 03:39 UTC)
Re: conjoin and disjoin Peter McGoron (02 Apr 2026 10:22 UTC)
Re: conjoin and disjoin Arthur A. Gleckler (02 Apr 2026 21:37 UTC)
Re: conjoin and disjoin Wolfgang Corcoran-Mathe (02 Apr 2026 21:57 UTC)
Re: conjoin and disjoin Arthur A. Gleckler (11 Apr 2026 22:01 UTC)

Re: conjoin and disjoin Wolfgang Corcoran-Mathe 02 Apr 2026 21:57 UTC

On 2026-04-02 06:17 -0400, Peter McGoron wrote:
>  (define (conjoin . predicates)
> -  (case-lambda
> -    (() #t)
> -    (args (let loop-args ((args args))
> -            (if (null? args)
> -                #t
> -                (let ((arg (car args)))
> -                  (let loop-preds ((predicates predicates))
> -                    (cond
> -                     ((null? predicates) (loop-args (cdr args)))
> -                     ((not ((car predicates) arg)) #f)
> -                     (else (loop-preds (cdr predicates)))))))))))
> +  (lambda args
> +      (every (lambda (proc) (apply proc args)) predicates)))

When a patch replaces some wonky nested loops with a single
application of a standard procedure, it's a good sign that it's
the Right Thing.

Nice work.

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>