in reply to Should we handle multiple arguments as a list?

How about when the function typically takes a single argument and returns a formatted (v. calculated) version. When you are formatting (lc, chomp, etc) you are very likely to have a list you want to operate on. When you are calculating, it is less likely.

Thinking as I type, I guess any function that takes one argument and returns one value, *could* return a list if passed a list *and* called in list context. (>1 argument not called in list context might cause a warn/die).

  • Comment on Re: Should we handle multiple arguments as a list?