Is there a logical reason why some functions such as Select
, GatherBy
, SplitBy
use functions as a "test" whereas some other functions such as Count
, Position
uses patterns as the "test"?
Also, why does Position[{a, {a, b}}, x_ /; Print[x], 1]
output List
, a
, {a,b}
while Count[{a, {a, b}}, x_ /; Print[x], 1]
outputs a
, {a,b}
?