[erlang-questions] List comprehension question

Erik Søe Sørensen eriksoe@REDACTED
Tue May 27 21:18:00 CEST 2014


Den 26/05/2014 13.02 skrev "Anthony Ramine" <n.oxyde@REDACTED>:
>
> That would change semantics of existing programs, no thanks.
>
> I do have plans to implement Pat ?= Expr filters, though, not reusing the
matching operator ‘=‘.

Sounds great - I never got past looking at the existing compiler code.
What's your plan (if you have one)?
As I remember it, an extension of Kernel Erlang is necessary...

>
> --
> Anthony Ramine
>
> Le 22 mai 2014 à 21:44, Rich Neswold <rich.neswold@REDACTED> a écrit :
>
> > It would be much nicer to use pattern matching and use the
comprehension's ability to treat bad matches as a filter. But I can't
replace the case statement above with:
> >
> > [{{S, NC}, SF} || {S, C} <- Reqs,
> >                   {value, {NC, SF}} = gb_trees:lookup({S, C}, T)]
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140527/bf2ba978/attachment.htm>


More information about the erlang-questions mailing list