On Sunday, 5 April 2015 at 09:48:01 UTC, thedeemon wrote:
On Friday, 3 April 2015 at 16:46:08 UTC, Dennis Ritchie wrote:
Hi,
Is it possible to write on D recursion using std.variant?
Using Algebraic from std.variant and some additional templates:
http://dpaste.dzfl.pl/65afd3a7ce52
(taken from
On Friday, 3 April 2015 at 16:46:08 UTC, Dennis Ritchie wrote:
Hi,
Is it possible to write on D recursion using std.variant?
Using Algebraic from std.variant and some additional templates:
http://dpaste.dzfl.pl/65afd3a7ce52
(taken from this thread:
http://forum.dlang.org/thread/yidovyrczgdiveq
Hi,
Is it possible to write on D recursion using std.variant?
-
#include
#include
struct Nil {};
auto nil = Nil{};
template
struct Cons;
template
using List = boost::variant>>;
template
struct Cons {
Cons(T val, List list) : head(val), tail(list) {}
T head;
L