You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the way it works in JavaScript. Specifically, you need to either provide an "initial value", or make sure the list is nonempty. If you do neither of those, you get an error.
That's nice because it means something like [].reduce(infix:<min>) will just outright fail. (We can't exactly return inf there because, by #517, our infinities are syntactic.)
With things like [].reduce(infix:<+>) I guess we could ask the infix:<+> nicely if it has a "zero value". But that's beyond the scope of this issue.
The text was updated successfully, but these errors were encountered:
(Filed while staring at #176.)
I like the way it works in JavaScript. Specifically, you need to either provide an "initial value", or make sure the list is nonempty. If you do neither of those, you get an error.
That's nice because it means something like
[].reduce(infix:<min>)
will just outright fail. (We can't exactly returninf
there because, by #517, our infinities are syntactic.)With things like
[].reduce(infix:<+>)
I guess we could ask theinfix:<+>
nicely if it has a "zero value". But that's beyond the scope of this issue.The text was updated successfully, but these errors were encountered: