On 12/06/2014 07:28 AM, Jonathan Marler wrote:
Is there a way to create a delegate that returns itself?
Y combinator helps exactly with that:
http://rosettacode.org/wiki/Y_combinator#D
Copying the code from there:
import std.stdio, std.traits, std.algorithm, std.range;
auto Y(S, T...)(S d
On Monday, 8 December 2014 at 14:38:37 UTC, Marc Schütz wrote:
On Monday, 8 December 2014 at 14:31:53 UTC, Jonathan Marler
wrote:
On Monday, 8 December 2014 at 14:08:33 UTC, Jonathan Marler
wrote:
On Saturday, 6 December 2014 at 15:46:16 UTC, Adam D. Ruppe
wrote:
The problem is the recursive *a
On Monday, 8 December 2014 at 14:31:53 UTC, Jonathan Marler wrote:
On Monday, 8 December 2014 at 14:08:33 UTC, Jonathan Marler
wrote:
On Saturday, 6 December 2014 at 15:46:16 UTC, Adam D. Ruppe
wrote:
The problem is the recursive *alias* rather than the
delegate. Just don't use the alias name i
On Monday, 8 December 2014 at 14:08:33 UTC, Jonathan Marler wrote:
On Saturday, 6 December 2014 at 15:46:16 UTC, Adam D. Ruppe
wrote:
The problem is the recursive *alias* rather than the delegate.
Just don't use the alias name inside itself so like
alias MyDelegate = void delegate() delegate()
On Saturday, 6 December 2014 at 15:46:16 UTC, Adam D. Ruppe wrote:
The problem is the recursive *alias* rather than the delegate.
Just don't use the alias name inside itself so like
alias MyDelegate = void delegate() delegate();
will work. The first void delegate() is the return value of the
The problem is the recursive *alias* rather than the delegate.
Just don't use the alias name inside itself so like
alias MyDelegate = void delegate() delegate();
will work. The first void delegate() is the return value of the
MyDelegate type.