As someone barely literate in functional programming, and coming from
javascript or ruby land, the thing that trips you up for a second is that
it's not called reduce.
Seeing two things named wordL and wordR, it's pretty clear for me what the
difference between them might be.
On Wednesday,
Yeah, aliases make easy to write, but harder to read and learn, since a
user might have only ever seen one and might not know what the other does.
On Wed, Oct 26, 2016 at 11:42 AM, Mike MacDonald
wrote:
> Aliases could also remain forever, so people could choose which they
Aliases could also remain forever, so people could choose which they
prefer. However, this seems counter to the prevailing direction for Elm.
On Wednesday, October 26, 2016 at 9:42:25 AM UTC-4, Robin Heggelund Hansen
wrote:
>
> I think aliasing would just push the problem further into the
Op woensdag 26 oktober 2016 13:21:03 UTC+2 schreef Rupert Smith:
>
> Also worth pointing out that these libraries (and possibly others) have
> adopted the convention of using a single 'l' or 'r' to mean from-the-left
> and from-the-right:
>
And the List library also has a scanl function (no
On Thursday, October 20, 2016 at 3:12:57 PM UTC+1, Robin Heggelund Hansen
wrote:
>
> In the same spirit, I propose that we change the name of foldl to
> foldLeft, and the name of foldr to foldRight. The difference between foldl
> and foldr isn't to spot at a cursory glance. foldLeft is also
Define "other functional languages". Clojure(script) doesn't have fold, but
reduce. F# has fold and foldBack.
What other languages do is, however, besides the point. The question is,
what is more readable? It's easier to confuse foldl with foldr than it is
to confuse fold(Left) with foldRight.
On Mon, Oct 24, 2016 at 2:12 PM, 'Rupert Smith' via Elm Discuss <
elm-discuss@googlegroups.com> wrote:
> -1 from me. foldl and foldr are so commonly in use in other functional
> languages that they are an acceptable short hand. Who cares what Scala does.
>
> The main target of Elm are developers
On Thursday, October 20, 2016 at 3:12:57 PM UTC+1, Robin Heggelund Hansen
wrote:
>
> In Elm 0.18, primes are being removed as valid characters in a
> variable/function name. The reason being, which I whole heartedly agree
> with, that removing primes will incentivize people to write proper
Changes like this I think make sense if it is part of a more general effort
- i.e 'Elm is going to be known as the language with proper function
names"i.e it sounds like a BDFL call. Has that every been stated by Evan or
is it just something that appears to be in the same line of thinking as
Please stay on topic. This thread is strictly about the naming of foldl and
foldr, nothing else.
torsdag 20. oktober 2016 19.24.47 UTC+2 skrev Ambrose Laing følgende:
>
> One could define fold as a generic operation that replaces the empty list
> with a constant (for example an identity
One could define fold as a generic operation that replaces the empty list
with a constant (for example an identity element) and replaces the "cons"
operator with a function that takes an element and a partial result. This
is consistent with other ways to define generalized folds over recursive
11 matches
Mail list logo