This is an interesting case. You need semicolons to get this to work on a single line:
function bounds(p::Vector); [min(p), max(p)]; end The preferred way to do this, by the way, is with the one-liner special syntax: bounds(p::Vector) = [min(p), max(p)] -- John On Jul 25, 2014, at 11:21 AM, Zenna Tavares <[email protected]> wrote: > AFAIK whitespace is supposed to be insignificant in non-macro Julia. > > Yet, > > function bounds(p::Vector) [min(p), max(p)] end > > > > > fails with > > ERROR: syntax: expected "(" in "function" definition > > whereas > > function bounds(p::Vector) > [min(p), max(p)] > end > > > > does not. > > Is this a bug?
