# How to define method for (:)?

**URL:** <https://discourse.julialang.org/t/how-to-define-method-for/34755>\
**Category:** New to Julia\
**Created:** [February 17, 2020, 12:02pm UTC](https://discourse.julialang.org/t/how-to-define-method-for/34755 "2020-02-17T12:02:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [February 17, 2020, 12:02pm UTC](https://discourse.julialang.org/t/how-to-define-method-for/34755/1 "2020-02-17T12:02:34Z")

</div>

if I don’t want to do like:

```julia
import Base: (:)
(:)(x, y) = xxxxxx

```

how could I define like:

```julia
Base.(:)(x, y) = ...
ERROR: syntax: invalid function name "Base.((:,))"

```

?  
thanks.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [February 17, 2020, 12:08pm UTC](https://discourse.julialang.org/t/how-to-define-method-for/34755/2 "2020-02-17T12:08:21Z")

</div>

```julia
Base.:(:)(a, b) = ...

```

should do the trick
