# Trouble defining hash/isequal for an interval type

**URL:** https://discourse.julialang.org/t/trouble-defining-hash-isequal-for-an-interval-type/106629
**Category:** General Usage
**Tags:** question, dictionary, hash
**Created:** [November 23, 2023, 9:01am UTC](https://discourse.julialang.org/t/trouble-defining-hash-isequal-for-an-interval-type/106629 "2023-11-23T09:01:31Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)
#### Post date: [November 24, 2023, 8:09am UTC](https://discourse.julialang.org/t/trouble-defining-hash-isequal-for-an-interval-type/106629/5 "2023-11-24T08:09:44Z")

</div>

> [@abraemer](#):
>
> It is a bit unclear to me what your goal is exactly

What I was trying to do was to use (clumsily, I understand from your, @stevengj and @StefanKarpinski’s answers) an idea seen in an ‘other post’ of which I don’t remember the link in which the hash() and ==() functions were redefined for a new User Type.  
The aim was to use a “special dictionary” to solve [this](https://discourse.julialang.org/t/how-to-separate-joint-and-disjoint-intervals-from-an-interval-vector/106515) problem.  
The idea was to emulate the groupby function (to create equivalence classes and put them together as requested by the OP (at least as I understood it), via the mergewith!(combine, d1,d2, … .)).

---

_[View the full topic](https://discourse.julialang.org/t/trouble-defining-hash-isequal-for-an-interval-type/106629)._
