Pass a function as a parameter in Netlogo
<p>In many other programming languages, you can pass a function as an argument to another function and call it from within the function.</p>

<p>Is there anyway to do this in Netlogo?</p>

<p>Such as the following:</p>

<pre><code>;; x,y,z are all ints
to-report f [x y z]
  report x + y + z
end

;; some-function is a function
;; x y and z are ints
to-report g [some-function x y z]
  report (some-function x y z) + 2
end

to go
  show g f 1 2 3
end
</code></pre>

<p>This would be a nice feature. I'm trying to implement an abstract local search algorithm which this would be nice for passing in objective functions and such.</p>