Skipping or Stepping Through an Array?
Ferhat Kurtulmuş
aferust at gmail.com
Wed Oct 21 16:38:34 UTC 2020
On Wednesday, 21 October 2020 at 14:03:54 UTC, DMon wrote:
> On Wednesday, 21 October 2020 at 13:04:40 UTC, Ferhat Kurtulmuş
> wrote:
>> import std.range;
>> import std.stdio;
>>
>> void main(){
>> auto source = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
>> auto chunks = chunks(source, 2);
>>
>> writeln(chunks[0]); // [1, 2]
>>
>> foreach(c; chunks)
>> writeln(c[1]);
>> }
>
> And, thank you Kurtulmuṣ (that's the closest "s" this keyboard
> has).
>
> I've played with std.range but didn't think a control structure
> or import should be necessary.
:) 'sh' sound in English
ş
UTF-8: ÅŸ
Numeric: ş
Ansi: ÅŸ
More information about the Digitalmars-d-learn
mailing list