| Thread overview | |||||||
|---|---|---|---|---|---|---|---|
|
July 01, 2014 zipWith or map | ||||
|---|---|---|---|---|
| ||||
Hello, is there a fancy way do a zipWith (map with multiple ranges). There is no in std.algorithm, or does it have a different name? | ||||
July 01, 2014 Re: zipWith or map | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Gecko | On Tue, 01 Jul 2014 17:49:53 +0000, Gecko wrote:
> Hello,
> is there a fancy way do a zipWith (map with multiple ranges). There is
> no in std.algorithm, or does it have a different name?
There is a zip function in std.range. It produces a range of tuples that you can then map over.
| |||
July 01, 2014 Re: zipWith or map | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Justin Whear | On Tuesday, 1 July 2014 at 17:51:17 UTC, Justin Whear wrote:
> There is a zip function in std.range. It produces a range of tuples that
> you can then map over.
Thank you,
I couldnt figure out what std.range.zip makes from the documentation.
something else : is there a scanl like in haskell (like reduce but returning the intermediate results as well).
| |||
July 01, 2014 Re: zipWith or map | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Gecko | Gecko:
> is there a scanl like in haskell (like reduce but returning the intermediate results as well).
Request in bugzilla, ma no Phobos pull request implementation yet.
Bye,
bearophile
| |||
July 01, 2014 Re: zipWith or map | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Tuesday, 1 July 2014 at 18:13:42 UTC, bearophile wrote: > Gecko: > >> is there a scanl like in haskell (like reduce but returning the intermediate results as well). > > Request in bugzilla, ma no Phobos pull request implementation yet. > > Bye, > bearophile Here's the issue https://issues.dlang.org/show_bug.cgi?id=13016. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply