On Wednesday, 28 October 2015 at 00:07:23 UTC, sigod wrote:
Only removed `filter` from code.
You know, I was just writing an answer for this and I kinda
changed my mind. Without filter... I think splitter.splitter
ought to work.
The implementation requires slicing unless you pass it a
pred
On Tuesday, 27 October 2015 at 22:56:07 UTC, sigod wrote:
On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe
wrote:
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really
thought it was a bug, so I posted it here.
You could, bu
On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe wrote:
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really thought
it was a bug, so I posted it here.
You could, but I'd say the same thing there
I don't expect different a
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really thought
it was a bug, so I posted it here.
You could, but I'd say the same thing there - it is no bug, the
algorithm legitimately needs that functionality to split
successfully. At
Well, problem boils down to `splitter` having a greater
constraints than most functions can meet.
Thanks everyone for clarification.
P.S. Maybe I should repost my question on SO? I really thought it
was a bug, so I posted it here.
On Tuesday, 27 October 2015 at 21:54:33 UTC, Jonathan M Davis
wrote:
Well, split calls splitter, and it doesn't make much of an
attempt to check its arguments in its template constraint,
mostly passing the buck onto splitter, since it's really just a
wrapper around splitter that calls array on
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
split's documentation says that it requires a ForwardRange but
the output of filter is an InputRange. (I can't imagine now why
split has that requirement.)
You need to .save at the beginning so when you hit the split
point, it ca
On 10/27/2015 02:55 PM, Adam D. Ruppe wrote:
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
split's documentation says that it requires a ForwardRange but the
output of filter is an InputRange. (I can't imagine now why split has
that requirement.)
You need to .save at the begi
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
On 10/27/2015 01:58 PM, sigod wrote:
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n'
On Tuesday, October 27, 2015 20:58:56 sigod via Digitalmars-d-learn wrote:
> Here's simple code:
>
> import std.algorithm;
> import std.array;
> import std.file;
>
> void main(string[] args)
> {
> auto t = args[1].readText()
> .splitter('\n')
> .filter!(e => e.le
On 10/27/2015 01:58 PM, sigod wrote:
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n')
.filter!(e => e.length)
.split("---")
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n')
.filter!(e => e.length)
12 matches
Mail list logo