# Sum elements of a struct

**URL:** <https://discourse.julialang.org/t/sum-elements-of-a-struct/80559>\
**Category:** New to Julia\
**Tags:** question, struct, sum\
**Created:** [May 5, 2022, 7:03pm UTC](https://discourse.julialang.org/t/sum-elements-of-a-struct/80559 "2022-05-05T19:03:00Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 5, 2022, 9:13pm UTC](https://discourse.julialang.org/t/sum-elements-of-a-struct/80559/8 "2022-05-05T21:13:17Z")

</div>

This seems like an [XY problem](https://xyproblem.info/). What are you actually trying to represent with your data structure here?

---

_[View the full topic](https://discourse.julialang.org/t/sum-elements-of-a-struct/80559)._
