# How to sum tuple elements

**URL:** <https://discourse.julialang.org/t/how-to-sum-tuple-elements/65753>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [August 3, 2021, 3:52pm UTC](https://discourse.julialang.org/t/how-to-sum-tuple-elements/65753 "2021-08-03T15:52:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Post date:** [August 3, 2021, 4:25pm UTC](https://discourse.julialang.org/t/how-to-sum-tuple-elements/65753/5 "2021-08-03T16:25:42Z")

</div>

@leandromartinez98 Sorry, your solution gives an error.  
I don’t understand why the complete solution gives an error:

```julia
numbers = [1,2,3,4,5]
x = collect(Iterators.product(numbers, numbers))
y = filter(t -> sum(t) == 6, x)

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-sum-tuple-elements/65753)._
