This looks it will produce correct output in many cases, but I'm not 
convinced it's correct in general.

Does it work on a case like this, and on even more deeply nested cases?

to-report foo [x] report x end
to-report bar [x] report x end
to baz __ignore foo bar 0 end

I'm looking at your logic and it isn't clear to me that all possible 
nestings (including recursive nestings) of _call and _callreport are 
handled properly, hence the test case. I don't see anywhere in your code 
that recursively processes entire argument trees, and not just the first 
level of the tree.

Also a nitpick that won't usually affect correctness: you shouldn't need to 
resort to looking for "_call" and "_callreport' as strings — _call and 
_callreport are classes, you should be able to detect instances of them via 
pattern matching (or `isInstanceOf`).

Seth

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netlogo-devel/9d8d89fe-66e8-494f-9786-154217a5b94fn%40googlegroups.com.

Reply via email to