On 07/29/2014 04:54 PM, Louis Dionne wrote:> Larry Evans
[...]
I looked at:
http://ldionne.github.io/hana/index.html
but saw no mention of the `let-expressions` that was mentioned here:
http://article.gmane.org/gmane.comp.lib.boost.devel/245231
Did I miss where they are documented or was there some problem in implementing them and, consequently, they were left out?
That was for the MPL11. With Hana, we use generic C++14 lambdas instead, so we don't need that emulation anymore.
Regards, Louis
So, let me check to see if I understand how generic c++14 lambdas would be used to emulate let-expressions. The let-expressions I'm talking about are described here: http://docs.racket-lang.org/reference/let.html Generic c++14 lambda expression are described here: https://isocpp.org/wiki/faq/cpp14-language#generic-lambdas The correspondence between the two, IIUC, is the let-expresion: ( let ( [id1 val-expr1] [id2 val-expr2] [id3 val-expr3] ... ) body-expr ) would be, using generic-lambdas: [] ( auto id1 , auto id2 , auto id3 ) { return body-expr } ( val-expr1 , val-expr2 , val-expr3 ... ) Is that about right? TIA. -regards, Larry