It's a question of intent. If your goal is to ask an object to take the "grep" action on a thingie and give you the result, you use a method call. If your goal is take a specific (global) action "grep" against a thingie and an object which you assume is an array (where the grep action indicates that it will do what it can to make it's argument an array and if it can't it will fail) then you use the function syntax.
Forget "grep" for a moment and imagine i'm providing you a a library that implements a "dothat" function. If you want to execute my "dothat" function against objectA and objectB, you call the funtion. If objectA says that coincidently it has a "dothat" method and you want to ask objectA to "dothat" to objectB you call the method.