Hamsters: A Tiny Scala Utilities Library
summary
Hamsters is a small Scala utility library that provides practical helpers built on standard Either/Option/Future: a Validation that accumulates all errors, FutureOption and FutureEither monad transformers to simplify Future[Option[_]]/Future[Either[_]] patterns, HLists with position- and type-safe head/tail plus type-based lookup, union types and an Enum typeclass. The library uses macros to generate enum helpers and Show instances, supports Scala.js, compiles to about a 5MB artifact, and includes examples and a workshop demonstrating the features.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:49Form validation
- 4:58Option/Future transformers
- 7:28Heterogeneous lists
- 10:18Variance with Disjunction
- 11:45Simplified enums
- 12:49Default values for Option
- 14:13Macros and extensions
- 15:37Q&A
related talks
50mCats — A Fresh Look at Functional Programming in Scala
32mTypelevel's Road to Scala 3
51mHands-on Typelevel Scala
01h 01mTypesafe Scala, Typelevel Scala – What’s Going On, Anyway?
38mFork It Harder Make It Better
01h 11mProject Presentations
34mBecoming a cat(s) person
33mHow Scala is made and how you can help?
