Re: Strange output

2013-06-08 Thread Daemon
On Friday, 7 June 2013 at 20:06:32 UTC, H. S. Teoh wrote: On Fri, Jun 07, 2013 at 09:10:53PM +0200, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. On Fri, Jun 07, 2013 at 09:14:00PM +0200, Daemon wrote: >auto de

Re: Strange output

2013-06-07 Thread Jesse Phillips
On Friday, 7 June 2013 at 19:10:54 UTC, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. You're probably just playing around, but FYI the function is http://dlang.org/phobos/std_algorithm.html#filter While you've c

Re: Strange output

2013-06-07 Thread H. S. Teoh
On Fri, Jun 07, 2013 at 09:10:53PM +0200, Daemon wrote: > The following program is supposed to print out only numbers that are > less than 5, yet the number 63 gets printed. On Fri, Jun 07, 2013 at 09:14:00PM +0200, Daemon wrote: > >auto de = find!(delegate(a) { return a < 5; })([10, 11, 15, 16, >

Re: Strange output

2013-06-07 Thread Daemon
On Friday, 7 June 2013 at 19:47:39 UTC, develop32 wrote: On Friday, 7 June 2013 at 19:10:54 UTC, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. module main; import std.stdio; import std.conv; int main(string[] a

Re: Strange output

2013-06-07 Thread develop32
On Friday, 7 June 2013 at 19:10:54 UTC, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. module main; import std.stdio; import std.conv; int main(string[] argv) { auto de = find!(delegate(a) { return a < 5; })([10

Re: Strange output

2013-06-07 Thread Daemon
auto de = find!(delegate(a) { return a < 5; })([10, 11, 15, 16, 27, 20, 2, -4, -17, 8, 64, 6]); Just a clarification, it prints out 64 with the input above, I changed it later just to test it and forgot to update the rest.

Strange output

2013-06-07 Thread Daemon
The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. module main; import std.stdio; import std.conv; int main(string[] argv) { auto de = find!(delegate(a) { return a < 5; })([10, 11, 15, 16, 27, 20, 2, -4, -17, 8, 64, 6]);