Re: Ranges: How to take N last of elements of range

2015-12-27 Thread Jakob Ovrum via Digitalmars-d-learn
On Saturday, 26 December 2015 at 05:31:59 UTC, Ur@nuz wrote: On Friday, 25 December 2015 at 20:06:04 UTC, drug wrote: 25.12.2015 17:13, Ur@nuz пишет: [...] You can do following http://dpaste.dzfl.pl/41c57f89a5a0 The reason of compile error is your using a range as a separator, change it

Re: Ranges: How to take N last of elements of range

2015-12-25 Thread via Digitalmars-d-learn
On Friday, 25 December 2015 at 20:06:04 UTC, drug wrote: 25.12.2015 17:13, Ur@nuz пишет: [...] You can do following http://dpaste.dzfl.pl/41c57f89a5a0 The reason of compile error is your using a range as a separator, change it to single symbol and it works. Also I used 'array' after 'tak

Re: Ranges: How to take N last of elements of range

2015-12-25 Thread drug via Digitalmars-d-learn
25.12.2015 17:13, Ur@nuz пишет: static struct LogerInfo { string func; int line; void write(T...)(T data) { import std.stdio; import std.algorithm: splitter; import std.range: retro; import std.range: ta

Ranges: How to take N last of elements of range

2015-12-25 Thread via Digitalmars-d-learn
How to take N last of elements of range? I have tried the following example in my code, but it says that it deprecated. What is the other possible way? static struct LogerInfo { string func; int line; void write(T...)(T d