Re: (declare (pure ...))

Pietro Cerutti <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <0107018d926a1fe0-b79b1dbd-270d-431b-806a-02e5c2dea606-000000@eu-central-1.amazonses.com>
> On 9 Feb 2024, at 21:06, Al <[email protected]> wrote:
> Hi,
> 
> 
> what does (declare (pure ..)) mean to csc? Is the function supposed to be
> 
> * only side-effect free, or ...
> 
> * also return the same value when called with the same arguments?


Back to your original question, to make sure I understand: can you show an example of a function which respects only one of those two points?

-- 
Pietro Cerutti
I've pledged to give 10% of income to effective charities and invite you to join me.
https://givingwhatwecan.org

Sent from a small device - please excuse brevity and typos.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.