On Mon, Jun 27, 2016 at 08:13:21PM -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Tue, Jun 28, 2016 at 01:41:03AM +, Smoke Adams via Digitalmars-d-learn
> wrote:
> > I have a type
> >
> > public class SuperFunction(T)
> > {
> > T t;
> > return(T) Do() { return t(); }
> > }
> >
>
On Tue, Jun 28, 2016 at 01:41:03AM +, Smoke Adams via Digitalmars-d-learn
wrote:
> I have a type
>
> public class SuperFunction(T)
> {
> T t;
> return(T) Do() { return t(); }
> }
>
> where T is a delegate or function. First, I would like to be able to
> specify that this must be the
On 06/27/2016 06:41 PM, Smoke Adams wrote:
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be able to
specify that this must be the case for SuperFunction so we can't pass
non-function/delegates
I should point out also that this should be inheritable.
Eventually I would like to create an algebra of SuperFunctions.
e.g., SF3 = SF1 + SF2
is a new super function that combines the parameter list of SF1
and SF2 and unionizes their return type. Both functions are
called by Do(which will
On Tuesday, 28 June 2016 at 01:41:03 UTC, "Smoke" Adams wrote:
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be
able to specify that this must be the case for SuperFunction so
we can't pass
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be able
to specify that this must be the case for SuperFunction so we
can't pass non-function/delegates for T. Second, How to specify
the return