<div class="gmail_quote">On Thu, Jul 12, 2012 at 6:46 PM, Joel de Guzman <span dir="ltr"><<a href="mailto:joel@boost-consulting.com" target="_blank">joel@boost-consulting.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div class="im"><br></div> You did not evaluate it. Try adding a () at the end:<br> <br> � phx::for_each(phx::ref(tokens)<u></u>,<br> � � phx::lambda<div class="im"> � � [<br> � � � phx::push_back(phx::ref(<u></u>string_tokens), phx::arg_names::arg1)<br></div> � � ]<br> � )();</blockquote><div><br></div><div>Adding the evaluation worked. �I get the expected results now.�</div><div><br></div><div>I now have the�simplest pure phoenix method to parse a boost tokenizer into a vector of strings. �Is there a helper method that can be written to automatically append the phx::lambda in this case. �This would give the following results.</div> <div><br></div><div>phx::for_each(phx::ref(tokens), phx::push_back(phx::ref(string_tokens), phx::arg_names::arg1))();</div><div><br></div><div>I understand the advantage of the lambda section. �It allows added variables to be created and more complicated requirements to be accomplished. �I just want to try and remove the extra syntax from my users view if it isn't�necessary�(other than to make it work :) ). �I would think it's possible if the argument from one method is being used directly in the other method without creating any additional variables.</div> <div><br></div><div>Like I said, I'm not sure if this is possible but would like to try if it is.</div><div><br></div><div>Ryan</div></div>