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

Joel Reymont joelr1@REDACTED
Wed Aug 27 18:50:21 CEST 2008


On Aug 27, 2008, at 5:07 PM, Sean Rasmussen wrote:

> Not sure if it's more elegant, but - if I understand your intent - I  
> would
> have gone with:
>
> mnesia:match_object(#inplay{amount=100,_='_'})
>>
>> db:find({inplay, GID, ID1, '_'}, #inplay.amount))

Sean, the two are equivalent since db:find uses match_object +  
element(N, Result). I'm just nitpicking since I have to say inplay  
twice in a row. Ignore me.

--
wagerlabs.com








More information about the erlang-questions mailing list