<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>% This code fails in Erlang R10B8 when debugger is running.<br>
%<br>
% Do the following:<br>
% * Compile this module<br>
% * Run "debugger_fun:test()", output is [yes,no,no,no]<br>
% * Start the debugger "debugger:start" and interpret this module; no
breakpoints etc. necessary<br>
% * Run "debugger_fun:test()" again, output is now [no,no,no,no]<br>
<br>
-module(debugger_fun).<br>
-export([test/0]).<br>
<br>
<br>
n(N) -><br>
    lists:map(<br>
      fun(X) when N==X -><br>
              yes;<br>
         (_) -><br>
              no<br>
      end,<br>
      [1,2,3,4]<br>
     ).<br>
<br>
test() -><br>
    n(1).<br>
</tt><br>
<br>
If you replace the "when" clause in the fun with a case expression then
it works fine.<br>
<br>
<div class="moz-signature">-- <br>
<span
 style="font-family: arial,helvetica,sans-serif; font-weight: bold;">Jakob
Skipper</span><br>
<span style="font-family: arial,helvetica,sans-serif;">Skipper ApS<br>
<a class="moz-txt-link-abbreviated" href="mailto:jakob@skipper.dk">jakob@skipper.dk</a><br>
+45 5192 4447</span>
</div>
</body>
</html>