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
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()
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
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
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
Is there a way to create a delegate that returns itself?
alias MyDelegate delegate() MyDelegate;
// OR
alias MyDelegate = MyDelegate delegate();
When I compile this I get:
Error: alias MyDelegate recursive alias declaration
The error makes sense but I still feel like there should be a way
to
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.