# With struct do

**URL:** <https://discourse.julialang.org/t/with-struct-do/41341>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 13, 2020, 9:22pm UTC](https://discourse.julialang.org/t/with-struct-do/41341 "2020-06-13T21:22:19Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [June 13, 2020, 10:46pm UTC](https://discourse.julialang.org/t/with-struct-do/41341/7 "2020-06-13T22:46:48Z")

</div>

I’m giving the user more options, so they can think about how they want to write their program. The functor looks pretty close to the `x = compositetype(1,2)` line in the OP (and so does an outer constructor!).

---

_[View the full topic](https://discourse.julialang.org/t/with-struct-do/41341)._
