[Top][All Lists]

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

Re: pure-fns in byte-opt.el

From: Philipp Stephani
Subject: Re: pure-fns in byte-opt.el
Date: Tue, 25 Jul 2017 20:57:58 +0000

Stefan Monnier <address@hidden> schrieb am Di., 25. Juli 2017 um 16:21 Uhr:
>> I was curious about what other functions might be pure and could be
>> added to this list.  While I seem to have guessed correctly on some,
>> I am perplexed why adding string-to-char breaks things:
> Strings are not immutable.

I agree that string-to-char is not a pure function, according to my
understanding of the meaning of "pure" in such a context.

Why? Its return value clearly only depends on its argument, and it doesn't change any global state. It's the poster child of a pure function!

reply via email to

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