<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Greetings,<br>
<br>
I can not duplicate your problem.<br>
<br>
In case I have misunderstood, here is my code (-define is not my
strong suite, so it has been removed).<br>
<br>
t() -> walk( [asd, qwe], [{123, 456}] ).<br>
<br>
walk ([I|Is], [Elt|_]=Ts) when (not is_tuple(Elt)) -> {[I|Is],
Ts};<br>
walk(_, _) -> the_other.<br>
<br>
This is what happens:<br>
<br>
4> c(t).<br>
{ok,t}<br>
5> t:t().<br>
the_other<br>
<br>
<br>
bengt<br>
<br>
<div class="moz-cite-prefix">On 11/20/2015 03:03 PM, jim rosenblum
wrote:<br>
</div>
<blockquote
cite="mid:CANnHf0MQCaETgS9DM4p8X0VJG2+rKvCqxGsiR=w1nT7L4O2Y2w@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">I have a function:
<div><br>
</div>
<div>walk ([I|Is], [Elt|_]=Ts) when (not is_tuple(Elt)) andalso
?IS_INDEX(I) -></div>
<div> Element = index_to_element(I,Ts),</div>
<div> case </div>
<div> ... snip ...</div>
<div> end.</div>
<div><br>
</div>
<div>This function clause gets executed even though Elt is a
tuple. </div>
<div><br>
</div>
<div>I have a break point within this function clause. I am
looking at the </div>
<div>debugger at the break-point within the clause, and I can
plainly see that Elt</div>
<div>IS a tuple: within the debugger I can evaluate
is_tuple(Elt) and it returns true,</div>
<div>I can evaluate (not is_tuple(Elt)) and correctly get FALSE.</div>
<div><br>
</div>
<div>So.... how can I be in this clause when the guard evaluates
to false?</div>
<div><br>
</div>
<div>Thoughts?</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>