On Thu, Apr 28, 2016, at 02:13 PM, Pyry Jahkola via swift-evolution wrote:
>> I would really like a different name for scan. While it’s the term of
>> art for Haskell and co, it really seems meaningless to regular
>> programmers (why is “scanning” the way you produce an array of
>> intermediate reduces?), and it would be better to follow the pattern
>> already established elsewhere in the library to give friendlier names
>> e.g. flatMap instead of bind, reduce instead of fold.
>>
>> I think Python calls it accumulate:
>> http://docs.python.org/3/library/itertools.html#itertools.accumulate
>
> FWIW, Clojure calls it `reductions[1]` which aligns pretty nicely with
> the `reduce` counterpart.
 
I like it.
 
-Kevin Ballard

Links:

  1. 
http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/reductions
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to