Javascript filter partial op
<p>The function "filter" returns an array  <code>[0,4]</code> but I don't understand how it gets that. Can you explain "partial"? Is it a built in function? I'm assuming that "op" applies the ">" operator to the numbers in the array. So since 5 is greater than 0 it gets added to the array "result". But how does "partial" work? </p>

<pre><code>function filter(test, array) {
  var result = [];
  forEach(array, function (element) {
    if (test(element))
      result.push(element);
  });
  return result;
}

show(filter(partial(op["&gt;"], 5), [0, 4, 8, 12]));
</code></pre>
