[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Axis_group_engraver + Scheme engraver for staff combining (issue 576
From: |
David Kastrup |
Subject: |
Re: Axis_group_engraver + Scheme engraver for staff combining (issue 576540043 by address@hidden) |
Date: |
Tue, 19 Mar 2019 00:04:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
address@hidden writes:
> On 2019/03/18 22:26:15, dak wrote:
>
>> The silence of the lambdas (almost):
>
>> #(define (divide-true-cdr ls)
>> "Split @var{ls} into those elements which don't and do have a tail of
>> value @code{#f}"
>> (call-with-values (lambda () (partition cdr ls)) list))
>
>> #(display (divide-true-cdr '((1 . #f) (2 . #t) (3 . #f))))
>> => (((2 . #t)) ((1 . #f) (3 . #f)))
>
>> --
>> David Kastrup
>
>
> Aargh, replacing `(lambda (a b) (list a b))´ with `list´ is ofcourse far
> better.
> I considered to use simple `cdr´ instead of `(lambda (x) (eq? #t (cdr
> x)))´, though one would need to ensure the `cdr´ is always a boolean,
> otherwise our procedures would return differently sometimes. Saul said
> so, though I thought better be paranoid than sorry ...
I have problems understanding how comparing with #t rather than #f is in
any sense better for a value presumed to be boolean. Why do you think
it is a good idea to consider 3.14 (say) equivalent to #f rather than #t
? I mean, nothing wrong with paranoia but to me this looks like bolting
the lampshade rather than some window.
> https://codereview.appspot.com/576540043/
--
David Kastrup