Skip to content

adelbertc/jumble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jumble

Currently only provides a Hashable type class.

This work is based on the hashable Haskell library. The future goal is to also include a HashMap and a HashSet, possible based on the unordered-collections Haskell library.

Usage

import jumble.syntax.hashable._

5.hash
List("hello", "world").hash

Option(3).hashWithSalt(10)


import jumble.Hashable

case class Box[A](run: A)

object Box {
  implicit def boxHashable[A : Hashable]: Hashable[Box[A]] =
    new Hashable[Box[A]] {
      override def hash(x: Box[A]): Int = Hashable[A].hash(x.run)
    }
}

License

Please see LICENSE for licensing details.

About

`Hashable` type class for Scala, based on the Haskell package `hashable`.

Resources

License

Stars

1 star

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages