[erlang-questions] Simple (dumb :) pattern matching question
Christian S
chsu79@REDACTED
Thu Dec 14 14:52:44 CET 2006
On 12/14/06, Pat e <patrickerj@REDACTED> wrote:
> I only need second argument to print out, i.e. {X,Y} = {2,3}, Y = 3
> > > {value, {_, FormSend}} = lists:keysearch("formsend", 1, R)
keysearch returns {value, Tuple}, the pattern
{value, {_, FormSend}} matches a Tuple of size two,
ignores the first element and binds the second to the variable
FormSend. It is very similar to
{_, Y} = {2, 3} in your example.
More information about the erlang-questions
mailing list