Adam D Ruppe pointed out in IRC it helps in inlining and optimization. Is there a thumb rule to decide this so that my functions too can benefit the performance and hence I could structure and understand my code better.
Why does map take lambda as a template parameter
xtreak via Digitalmars-d-learn Sat, 23 Apr 2016 13:11:51 -0700
map takes lambda as a template parameter and so does filter and
many other functions. Sometimes they take something other than
lambda as a template parameter. Eg. In case of to!int("5") int is
a type and hence might need it as a template parameter but why
does map and others take it as template parameter.
- Why does map take lambda as a template ... xtreak via Digitalmars-d-learn
- Re: Why does map take lambda as a ... Lass Safin via Digitalmars-d-learn