arrow-core-data / arrow.core / Hashed

Hashed

data class ~~Hashed~~<A> : HashedOf<A> Deprecated: Hash is deprecated in favor of hashCode(), since Kotlin’s Std doesn’t take Hash into account

Wrapper type that caches a values precomputed hash with the value

Provides a fast inequality check with its Eq instance and its Hash instance will use the cached hash.

Constructors

<init> Wrapper type that caches a values precomputed hash with the valueHashed(hash: Int, value: A)

Properties

hash val hash: Int
value val value: A

Companion Object Functions

fromHash fun <A> A.fromHash(HA: Hash<A>): Hashed<A>

Extension Functions

altFold fun <T, F, A> Kind<T, A>.altFold(AF: Alternative<F>, FT: Foldable<T>): Kind<F, A>
altSum fun <T, F, A> Kind<T, Kind<F, A>>.altSum(AF: Alternative<F>, FT: Foldable<T>): Kind<F, A>
fix fun <A> HashedOf<A>.~~fix~~(): Hashed<A>

Do you like Arrow?

Arrow Org
<