# What controls if a an operator 1⊕2⊕3 is varadic

**URL:** https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593
**Category:** General Usage
**Tags:** question
**Created:** [October 18, 2020, 5:36pm UTC](https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593 "2020-10-18T17:36:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [October 18, 2020, 5:36pm UTC](https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593/1 "2020-10-18T17:36:00Z")

</div>

Contrast how + parses vs a custom operator:

```julia

julia> dump(:(1+2+3))
Expr
  head: Symbol call
  args: Array{Any}((4,))
    1: Symbol +
    2: Int64 1
    3: Int64 2
    4: Int64 3

```

it becomes `+(1,2,3)`

```julia
julia> dump(:(1⊕2⊕3))
Expr
  head: Symbol call
  args: Array{Any}((3,))
    1: Symbol ⊕
    2: Expr
      head: Symbol call
      args: Array{Any}((3,))
        1: Symbol ⊕
        2: Int64 1
        3: Int64 2
    3: Int64 3

```

it becomes ` ⊕(⊕(1,2),3)`.

`*` does it also  
Is it just `+` and `*` that is special?  
or is there a unicode category that does this?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [October 18, 2020, 5:45pm UTC](https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593/2 "2020-10-18T17:45:28Z")

</div>

[https://docs.julialang.org/en/v1/devdocs/ast/#Operators](https://docs.julialang.org/en/v1/devdocs/ast/#Operators)

> Some operators ( `+` and `*` ) use N-ary parsing; chained calls are parsed as a single N-argument call.

---

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [October 18, 2020, 6:04pm UTC](https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593/3 "2020-10-18T18:04:23Z")

</div>

So it it literally just those two? They are not examples, that is the full list?

---

<div class="post-metadata">

### Author: ![WschW](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wschw/32/6575_2.png) [@WschW](https://discourse.julialang.org/u/WschW)
#### Post date: [October 18, 2020, 6:32pm UTC](https://discourse.julialang.org/t/what-controls-if-a-an-operator-1-2-3-is-varadic/48593/4 "2020-10-18T18:32:31Z")

</div>

`++` as well I believe

[https://github.com/JuliaLang/julia/blob/44b55d15842ae13744cc12689197a918a1e4b17b/src/julia-parser.scm#L912](https://github.com/JuliaLang/julia/blob/44b55d15842ae13744cc12689197a918a1e4b17b/src/julia-parser.scm#L912)
