# Properly implement Base.hash() for custom type

**URL:** <https://discourse.julialang.org/t/properly-implement-base-hash-for-custom-type/61951>\
**Category:** General Usage\
**Created:** [May 27, 2021, 5:56pm UTC](https://discourse.julialang.org/t/properly-implement-base-hash-for-custom-type/61951 "2021-05-27T17:56:27Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![anon60034542](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Post date:** [May 28, 2021, 7:32pm UTC](https://discourse.julialang.org/t/properly-implement-base-hash-for-custom-type/61951/12 "2021-05-28T19:32:35Z")

</div>

> [@fredrikekre](#):
>
> It would be great to add an example to make this clear then, do you want to contribute with that? [Here](https://github.com/JuliaLang/julia/blob/5dbf45a2997acd26e0f72abaa320c9d0d54956a1/base/hashing.jl#L5-L19) is the docstring.

It’s funny you mention that, because I [suggested](https://discourse.julialang.org/t/would-it-be-possible-to-update-the-documentation-to-include-how-to-implement-isequal-and-hash/53518) it a few months ago 😃 .

I’m still learning so I don’t think that I’d be able to produce an accurate example. Perhaps someone with deep knowledge of Julia might update the documentation.

---

_[View the full topic](https://discourse.julialang.org/t/properly-implement-base-hash-for-custom-type/61951)._
