Three dots `...`

At various points in my exploration of Julia code, I find ... being used. For example, in help for symbol ?Symbol

Symbol(x...) -> Symbol

And, currently, I’m using the following code that includes ... to create a data frame from an array (using the first row as the column titles).

DataFrame_wTitles = DataFrame([[anArray[2:end,i]...] for i in 1:size(anArray,2)], Symbol.(anArray[1,:]))

However, it’s difficult to find documentation on ... or “three dots”, or “dots” . . . Broadcasting uses dot notation. It’s short and sweet notation, but I wonder how ... is officially referred to and does it have several meanings.


It’s called splatting


This is what the manual has, not easy to search for I agree!…-operator-do?


splatting and slurping

Love it.

1 Like

Others have answered already but I thought it might be useful to add the ? answer:

help?> ...
search: ...


  The "splat" operator, ..., represents a sequence of arguments. ... can be used in function definitions, to indicate
  that the function accepts an arbitrary number of arguments. ... can also be used to apply a function to a sequence
  of arguments.


  julia> add(xs...) = reduce(+, xs)
  add (generic function with 1 method)

  julia> add(1, 2, 3, 4, 5)

  julia> add([1, 2, 3]...)

  julia> add(7, 1:100..., 1000:1100...)

So whenever you don’t know what a certain operator/symbol/whatever does, you can try the built-in ? functionality.


This is excellent advice, though one thing it falls down on us the ternary operator. Took me forever to figure out how to google “question mark and colon syntax”…

1 Like
help?> ?
search: ? ?:

  a ? b : c

  Short form for conditionals; read "if a, evaluate b otherwise evaluate c". Also known as the ternary operator (

  This syntax is equivalent to if a; b else c end, but is often used to emphasize the value b-or-c which is being used as part of a larger expression, rather than the side effects that evaluating b or c may have.

  See the manual section on control flow for more details.


  julia> x = 1; y = 2;
  julia> println(x > y ? "x is larger" : "y is larger")
  y is larger



LOL. Julia user since 0.5.something. Just now finding out ? gives you a help repl.

however, when I tried to do help on ?: as per @nilshg 's example this is what happens…

help?> ?

  Welcome to Julia 1.4.2. The full manual is available at

  as well as many great tutorials and learning resources:

  For help on a specific function or macro, type ? followed by its name, e.g.
  ?cos, or ?@time, and press enter. Type ; to enter shell mode, ] to enter
  package mode.


typing ? at the help?> prompt drops me back to the repl where as in his example it seems to drop you into a search prompt ??

1 Like

Yes, this seems to be a 1.5 addition.

well then it’s time to upgrade ! :slight_smile:

Oh thank God. It was several years ago when I went looking, and I swear I tried this. You had me worried :smiley: