fix Issue 12409 - Add "each" function as found in Ruby and jQuery

https://d.puremagic.com/issues/show_bug.cgi?id=12409
A predicate is a subset of functions that return either true or false. I think his choice is correct here, but it should be changed everywhere `fun` is called a predicate.