[erlang-questions] Field name to tuple element number at compile time

Joel Reymont joelr1@REDACTED
Wed Aug 27 17:29:18 CEST 2008


On Aug 27, 2008, at 4:14 PM, Bengt Kleberg wrote:

> Greetings,
>
> Do you mean like this:
>
> #foo.bar


Yes, thanks to everyone who took the time to reply!

I'm still looking for a more elegant way to write the following

db:find({inplay, GID, ID1, '_'}, #inplay.amount))

without incurring a penalty for building the match pattern at runtime,  
while _also_ saving on typing inplay twice.

--
wagerlabs.com








More information about the erlang-questions mailing list