Advanced ETS Pattern Matching

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Advanced ETS Pattern Matching

Erik Reitsma (RY/ETM)-2
> How can I convert a given list like [a,b] into a match specification
> like [a,b|'_'] to pass to ets?  i.e. I may conditionally want
> to employ the use of |'_' in the match spec.

Is this what you mean?

Eshell V5.2  (abort with ^G)
1> L=[a,b].
[a,b]
2> L++'_'.
[a,b|'_']

Regards,
*Erik.


Reply | Threaded
Open this post in threaded view
|

Advanced ETS Pattern Matching

Eric Newhuis
Thank you very much.  I no longer feel ignorant.  I probably just appear
to be ignorant.  The former was quick to resolve.  The latter will take
some time.

But this is great.  I will now flush my Trie down the toilet.  ETS does
everything I need.  ETS rules!!

Sincerely,
Eric
 


-----Original Message-----
From: Erik Reitsma (ELN) [mailto:Erik.Reitsma]
Sent: Tuesday, January 07, 2003 8:48 AM
To: 'Eric Newhuis'; erlang-questions
Subject: RE: Advanced ETS Pattern Matching


> How can I convert a given list like [a,b] into a match specification
> like [a,b|'_'] to pass to ets?  i.e. I may conditionally want to
> employ the use of |'_' in the match spec.

Is this what you mean?

Eshell V5.2  (abort with ^G)
1> L=[a,b].
[a,b]
2> L++'_'.
[a,b|'_']

Regards,
*Erik.