Attempting to trick NetLogo into executing a function passed as an argument
问题 The following produces a compilation error. to-report call-first/last [first/last a-list] report first/last a-list end a-list in the body is highlighted with the error: Expected command. So I tried the following. to-report call-first/last [first/last a-list] report first map first/last (list a-list) end This code compiled(!), but when I attempted to have the observer execute it call-first/last first [1 2 3] call-first/last was highlighted with the error message: CALL-FIRST/LAST expected 2