tdlp: higher-order functions

2012-01-20 Thread Jerome BENOIT
Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the first code example is: - T[] find(alias pred, T)(T[] input) if (is(typeof(pred(input[0])) == bool)) { for(; input.lengt

Re: tdlp: higher-order functions

2012-01-20 Thread Alex Rønne Petersen
On 20-01-2012 15:32, Jerome BENOIT wrote: Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the first code example is: - T[] find(alias pred, T)(T[] input) if (is(typeof(pred(input[0])) ==

Re: tdlp: higher-order functions

2012-01-20 Thread Jerome BENOIT
Thanks. Let go further. On 20/01/12 15:58, Alex Rønne Petersen wrote: On 20-01-2012 15:32, Jerome BENOIT wrote: Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the first code example is: ---

Re: tdlp: higher-order functions

2012-01-20 Thread Jerome BENOIT
Hello Again: On 20/01/12 15:58, Alex Rønne Petersen wrote: On 20-01-2012 15:32, Jerome BENOIT wrote: Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the first code example is: - T[] fi

Re: tdlp: higher-order functions

2012-01-20 Thread Alex Rønne Petersen
On 20-01-2012 17:14, Jerome BENOIT wrote: Hello Again: On 20/01/12 15:58, Alex Rønne Petersen wrote: On 20-01-2012 15:32, Jerome BENOIT wrote: Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the first code example is: -

Re: tdlp: higher-order functions

2012-01-20 Thread Jerome BENOIT
On 20/01/12 17:23, Alex Rønne Petersen wrote: On 20-01-2012 17:14, Jerome BENOIT wrote: Hello Again: On 20/01/12 15:58, Alex Rønne Petersen wrote: On 20-01-2012 15:32, Jerome BENOIT wrote: Hello List: In tDlp book in section 5.6 entitled `Higher-Order Functions. Function Literals, the firs

Re: tdlp: higher-order functions

2012-01-20 Thread Ali Çehreli
On 01/20/2012 08:43 AM, Jerome BENOIT wrote: > - > T[] find(alias pred, T)(T[] input) > if (is(typeof(pred(input[0])) == bool)) { > for(; input.length > 0; input = input[1 .. $]) { > if (pred(input[0])) break; >>>

Re: tdlp: higher-order functions

2012-01-20 Thread Tobias Pankrath
> > Philippe Sigaud's template document covers everything about templates: > >https://github.com/PhilippeSigaud/D-templates-tutorial > > (Just download the pdf there.) This should be on the website.