anchor.diff:         {{x,y,2},[{[{'$1',{'$2','$1'}},'$1'],[],[]}],[local]}}
        ,{"x:y(A,[A,{B,[B,A]},A],B)",
          {{x,y,3},[{['$1',['$1',{'$2',['$2','$1']},'$1'],'$2'],[],[]}],[local]}}
  -     ,{" a:foo when a==b",
  -       guards_without_args}
        ,{"a:b(X,y)when is_atom(Y)",
          unbound_variable}
        ,{"x:c([string])",
  
positive.code: split_fun(Str) ->
    fun() ->
        % strip off the actions, if any
        case re:run(Str,"^(.+)->\\s*([a-z;]+)\\s*\$",[{capture,[1,2],list}]) of
          {match,[St,Action]} -> ok;
          nomatch             -> St=Str,Action=""
        end,
        % strip off the guards, if any
        case re:run(St,"^(.+[\\s)])+when\\s(.+)\$",[{capture,[1,2],list}]) of
          {match,[S,Guard]} -> ok;
          nomatch           -> S=St,Guard=""
        end,
        % add a wildcard F, if Body is just an atom (presumably a module)
        case re:run(S,"^\\s*[a-zA-Z0-9_]+\\s*\$") of
          nomatch -> Body=S;
          _       -> Body=S++":'_'"
        end,
        {Body,Guard,Action}
    end.
  
  
negative.code:        {{a,b,2},[{['$1','$1'],[],[]}],[local]}}
       ,{"a:b(X,y)",
         {{a,b,2},[{['$1',y],[],[]}],[local]}}
       ,{"a:foo()when a==b",
         {{a,foo,0},[{[],[{'==',a,b}],[]}],[local]}}
       ,{"a:foo when a==b",
         {{a,foo,'_'},[{'_',[{'==',a,b}],[]}],[local]}}
       ,{"a:b(X,1)",
         {{a,b,2},[{['$1',1],[],[]}],[local]}}
       ,{"a:b(X,\"foo\")",
  