On Monday, 29 February 2016 at 15:37:06 UTC, jmh530 wrote:
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
I have started to learn D lately and as a part of my learning
process I decided to put my insights into a new, open platform
- the D Functional Garden.
I like.
One suggestion. It can be hard to read long chains of calls.
When you do it this way, the assert part also looks a little
messy. This would give:
auto result = [1,2,3,4]
.chunks(2)
.map!(sum)
.array;
assert(result == [3, 7]);
Great idea. You are absolutely right! I changed the snippets
accordingly.
Would it be good to have both getting-used-to-syntax and more
effective-problem-solving as well? Then again if the snippets
are realistic that would already be there.
I think what you are going for is sth like grouping or categories
- yep that definitely makes sense and once I find time, I will
add this too :)