For string matching, you'd expect in(x, y) to tell you if x is a substring of y, that is, if "x in y". Analogously, you'd expect contains(x, y) to tell you if y is a substring of x.
#Rstats calls its function str_detect, which offers no clue as to the order of the arguments.
@Pat My bash skills aren't as good. What would that do? I'm guessing the "for x in y;" would do nothing because the semicolon ends the statement, and then the next part would run regardless.
If you really want infix functions, you can do it easily in Haskell and with a hideous kludge in Python.
@peterdrake
It's a BASH compound command. Like a for/next loop...
for x in y; do list; done
where "x" is a variable, "y" is a list of words, "list" is a list of commands. Each time through the loop, x gets set to the next word in the "y" list of words.
It's not a function and actually has little to do with what you were talking about. I just threw it out there to jovially add to the confusion.