Re: Access violation using chain()

2012-04-22 Thread Brad Anderson
On Thursday, 19 April 2012 at 16:19:05 UTC, Brad Anderson wrote: On Thu, Apr 19, 2012 at 7:25 AM, Christophe trav...@phare.normalesup.orgwrote: Brad Anderson , dans le message (digitalmars.D.learn:34902), a écrit : Perhaps I'm just misunderstanding something about closures but the

Access violation using chain()

2012-04-19 Thread Brad Anderson
Perhaps I'm just misunderstanding something about closures but the following code seems to behave oddly: import std.stdio, std.range, std.algorithm, std.string; void main() { auto lst = [a, b]; auto rng = range_gen(lst); writeln(rng.take(5)); } auto

Re: Access violation using chain()

2012-04-19 Thread Christophe
Brad Anderson , dans le message (digitalmars.D.learn:34902), a écrit : Perhaps I'm just misunderstanding something about closures but the following code seems to behave oddly: import std.stdio, std.range, std.algorithm, std.string; void main() { auto lst = [a,

Re: Access violation using chain()

2012-04-19 Thread Brad Anderson
On Thu, Apr 19, 2012 at 7:25 AM, Christophe trav...@phare.normalesup.orgwrote: Brad Anderson , dans le message (digitalmars.D.learn:34902), a écrit : Perhaps I'm just misunderstanding something about closures but the following code seems to behave oddly: import std.stdio, std.range,