As Greg explained, the named let form simplifies the interface to other code.
It is much more common in practice.
> On Sep 6, 2014, at 23:50, Greg Hendershott wrote:
>
> Well, I think you answer your own question with good reasons in the
> last paragraph. :)
>
> If `acc` is an implementation d
Well, I think you answer your own question with good reasons in the
last paragraph. :)
If `acc` is an implementation detail, let's not expose it as a parameter.[1]
At least, let's not do this for a function provided by a module.
Especially not a function with a contract and/or documentation.
But
Hi guys,
Which is preferable?
(define (foo let … (acc empty)) … (foo (rest let) ... (cons …. acc))
or
(define (foo lst ...) (let loop ([lst lst] …[acc empty]) … (loop (rest let) …
(cons …. acc)))
On the one hand we eliminate the named let construct, but on the other hand we
expose the acc i
3 matches
Mail list logo