Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 1 month ago
JSON representation
A mini Scala utility library
- Host: GitHub
- URL: https://github.com/scala-hamsters/hamsters
- Owner: scala-hamsters
- License: apache-2.0
- Created: 2016-04-18T13:12:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-19T17:54:15.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T17:31:24.024Z (4 months ago)
- Topics: enums, error-handling, functional-programming, minimal, monad-transformers, typeclass, union-types, validation
- Language: Scala
- Homepage:
- Size: 2.53 MB
- Stars: 290
- Watchers: 22
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
- awesome-fp - hamsters - A mini Scala utility library. (Libraries)
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.