# Create a set with custom hash and isequal

**URL:** https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862
**Category:** General Usage
**Tags:** set, hash
**Created:** [April 8, 2025, 8:08pm UTC](https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862 "2025-04-08T20:08:07Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)
#### Post date: [April 9, 2025, 7:31pm UTC](https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862/8 "2025-04-09T19:31:09Z")

</div>

> [@Dictionary with custom hash function](https://discourse.julialang.org/t/dictionary-with-custom-hash-function/49168/4):
>
> Just wrap your keys in a new type

Sure, but then you have to unwrap the elements again when you want to use methods defined for the original type – if that it possible at all. Maybe the elements are used inside a function defined in some third-party package. It would be nice if everything could be done under the hood.

---

_[View the full topic](https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862)._
