# Add fill method accepting constructor function

**URL:** <https://discourse.julialang.org/t/add-fill-method-accepting-constructor-function/33424>\
**Category:** General Usage\
**Created:** [January 15, 2020, 11:22pm UTC](https://discourse.julialang.org/t/add-fill-method-accepting-constructor-function/33424 "2020-01-15T23:22:02Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 16, 2020, 5:05pm UTC](https://discourse.julialang.org/t/add-fill-method-accepting-constructor-function/33424/11 "2020-01-16T17:05:06Z")

</div>

Yep. And of course this power can be abused in creative ways:

```julia
julia> (i::Int)(x) = i + x

julia> (2).([3,5])
2-element Array{Int64,1}:
 5
 7

```

---

_[View the full topic](https://discourse.julialang.org/t/add-fill-method-accepting-constructor-function/33424)._
