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

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to