Yes, as long as S7 is "mostly r5rs" as the docs state, then *only* #f can evaluate as #f. Nil and 0 both have to evaluate as #f in a boolean context. A bit different but has its uses! Which is why recusing over scheme lists, the base check is usually done with the null? predicate: (null? list-that-might-be-empty :alldone)
iain On Tue, Sep 8, 2020 at 4:26 AM Orm Finnendahl < [email protected]> wrote: > Hi, > > Am Dienstag, den 08. September 2020 um 13:11:02 Uhr (+0200) schrieb > Kjetil Matheussen: > > There's lots of situations where this would be practical, but since s7 > > is a Scheme implementation, I think it's probably best to behave as #t > > to avoid trouble when porting to other scheme implementations. Also, > > people who knows scheme would be confused if '() returned #f. > > Exactly. This is a well known (much discussed) difference between > scheme and common lisp (or other dialects) and would break scheme if > changed. If you feel adventurous, I'd recommend to overwrite if at the > beginning of your code or define a custom macro of a different name > which behaves like cl's if for the use cases where you need this > behaviour. > > -- > Orm > _______________________________________________ > Cmdist mailing list > [email protected] > https://cm-mail.stanford.edu/mailman/listinfo/cmdist >
_______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
