[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optional arguments for scheme functions
From: |
David Kastrup |
Subject: |
Re: Optional arguments for scheme functions |
Date: |
Sun, 26 Apr 2020 22:18:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Aaron Hill <address@hidden> writes:
> On 2020-04-26 10:01 am, David Kastrup wrote:
>> Predicates used in argument parsing have to be "primary" in that they
>> have to deliver a result for anything thrown at them.
>> positive? only delivers results for numbers but throws an error for
>> anything else.
>
> Would there be harm in redefining an R5RS primitive?
>
> ;;;;
> (define (positive? arg) (and (number? arg) (< 0 arg))
> ;;;;
It tends to make for a real mess for independent modules importing
(scm lily) because then they tend to moan about conflicting definitions.
--
David Kastrup