chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH][5] Move foldable binding annotations into


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH][5] Move foldable binding annotations into types.db
Date: Wed, 1 Oct 2014 09:20:37 +0200
User-agent: Mutt/1.4.2.3i

On Wed, Oct 01, 2014 at 12:17:21AM -0700, Evan Hanson wrote:
> On 2014-10-01  8:57, Peter Bex wrote:
> > Shouldn't the same be done for #:pure?  If a procedure is purely
> > functional, it should be referentially transparent, which means it
> > should be foldable.  Or am I overlooking something here?
> 
> I believe so: the requirement that certain procedures always return
> newly allocated objects. For example, `cons`, while pure, should never
> be folded.

Thanks for pointing that out.  That's so obvious I missed it ;)
How about pure functions returning only immediate values?  Those are
always interchangeable, so should be always foldable.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]