in reply to How to detect a returns value gracefully

The code you posted doesn't work like you described.

There is no way to test if a function returns a list or not, since capturing the return value(s) forces the function to return either a list (which isn't an array) or a scalar. This is by design and you cannot work around it.

  • Comment on Re: How to detect a returns value gracefully