Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scala-hamsters/hamsters

A mini Scala utility library
https://github.com/scala-hamsters/hamsters

enums error-handling functional-programming minimal monad-transformers typeclass union-types validation

Last synced: about 2 months ago
JSON representation

A mini Scala utility library

Awesome Lists containing this project

README

        

= Hamsters
:release-version: 3.1.0
ifndef::env-github[:icons: font]
ifdef::env-github[]
:outfilesuffix: .adoc
:note-caption: :paperclip:
endif::[]

image:https://travis-ci.org/scala-hamsters/hamsters.svg?branch=master["Build Status", link="https://travis-ci.org/scala-hamsters/hamsters"]

A mini Scala utility library. Compatible with functional programming beginners. For the JVM and Scala.js.

It may help you understand how to use - and how to implement (looking at the code) - some popular functional programming features. Il also provides some useful utilities.

Hamsters "full" lib is compatible with Scala 2.11 and 2.12. Some parts of the lib, that are not relying on Scala Meta macros are compatible with 2.13 and extracted in https://github.com/scala-hamsters[their own repository].

image::https://raw.githubusercontent.com/scala-hamsters/hamsters/gh-pages/hamsters.jpg[Hamster logo,width=150]

Currently, Hamsters supports :

* Data validation
* Default values for options (orEmpty)
* Enum typeclass
* Future Squash (simplifications for nested types)
* HLists
* Lens
* mapN
* Memoization
* Monad transformers
* NonEmptyList
* Retry
* Sealed traits children listing
* Show (better toString)
* Union types

== Documentation

https://github.com/scala-hamsters/hamsters/tree/{release-version}/docs[Hamsters {release-version} documentation]

== Install as dependency

[source,scala,subs="verbatim,attributes"]
----
libraryDependencies ++= Seq(
"io.github.scala-hamsters" %% "hamsters" % "{release-version}"
)
----

For Scala.js :

[source,scala,subs="verbatim,attributes"]
----
libraryDependencies ++= Seq(
"io.github.scala-hamsters" %%% "hamsters" % "{release-version}"
)
----

== Extensions

See https://github.com/scala-hamsters/hamsters-extensions[hamsters-extensions] for more information.

== Scaladoc

You can find the API documentation https://static.javadoc.io/io.github.scala-hamsters/hamsters_2.12/{release-version}/io/github/hamsters/index.html[here].

== Special thanks

To https://github.com/laurencebeillaux[Laurence Beillaux] who created the Hamsters logo.