# Best practice for broadcastable callables

**URL:** <https://discourse.julialang.org/t/best-practice-for-broadcastable-callables/21000>\
**Category:** General Usage\
**Tags:** broadcast\
**Created:** [February 20, 2019, 6:26am UTC](https://discourse.julialang.org/t/best-practice-for-broadcastable-callables/21000 "2019-02-20T06:26:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 20, 2019, 8:29am UTC](https://discourse.julialang.org/t/best-practice-for-broadcastable-callables/21000/4 "2019-02-20T08:29:44Z")

</div>

For example, I can define

```julia
vapply!(f::VCompose, y, x) = y .= f.f.(f.g.(x))

```

to avoid allocations in my example.

---

_[View the full topic](https://discourse.julialang.org/t/best-practice-for-broadcastable-callables/21000)._
