[Issue 12272] and(), or(), xor() to compose predicates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 28 08:00:15 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12272
--- Comment #4 from yebblies <yebblies at gmail.com> 2014-03-01 03:00:09 EST ---
(In reply to comment #3)
>
> With those templates you can define a new predicate in point-free style
> (std.functional.compose!() does something similar for arbitrary functions):
IIRC std.functional.compose predates lambdas
>
> alias two = and!(startsWithJ, fourLetterLong);
>
> With lambdas it becomes similar to:
>
> enum two = (in string s) => s.startsWithJ && s.fourLetterLong;
I expect we will soon be able to do this:
alias two = s => s.startsWithJ && s.fourLetterLong;
>
> So are you suggesting to close down this ER because it's not useful enough?
I don't think this is worth adding to phobos. Of course what you do with this
ER is up to you.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list