Marketing of D - article topic ideas?

Philippe Sigaud philippe.sigaud at gmail.com
Tue Jun 8 13:11:00 PDT 2010


On Tue, Jun 8, 2010 at 20:13, Nick Sabalausky <a at a.a> wrote:

>
> Template currying ;) Maybe not as flexible as typical currying, but still.
>

I recenly achieved getting partially there. At least, given

foo(A,B,C)(n args list) {...}

curry!foo will correctly create n 1-arg templated function inside one
another and deliver the result at the end.
But it does not verify the compatibility of arguments while filling the
arguments :(

Given

foo(A,B,C)(A a, Tuple!(B,A) b, C[A] c)

curry!foo will accept any A a, but then should only accept b's of the
correct type: Tuple!(B,A), for some B and the already defined A, and the
same for c. I'm making sense there?

I more or less see how to get there, but can't get motivated to do this :-)



> Also, what's Unqual?
>

Gets rid of any const/immutable qualifiers.

Philipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100608/4e4fce9b/attachment.html>


More information about the Digitalmars-d mailing list