Funkr brings some common functional programming constructs to ruby. In particular, it offers a simple mechanism to create Algebraic Data Types and do pattern matching on them. For an exemple implementation, see provided classes. It also provide modules for common categories (Monoid, Monad, Functor, Applicative ...), and extends common types to support categories they belongs to (Array, Hash ...). Categories can also be used with custom types, see provided classes. To get started, we recommand you to read the tests, and get feets wet with provided Algebraic Data Types (like Maybe). Funkr is heavily used by its authors in production at http://www.atikteam.com/en to ensure better code reliability.
Project
funkr
Funkr is a functionnal toolbox for the Ruby language.
In particular, it offers a simple mechanism to create Algebraic Data
Types and do pattern matching on them.
-
It also provide modules for common categories (Monoid, Monad,
Functor, Applicative ...), and extends common types to support
categories they belongs to (Array, Hash ...). Categories can also be
used with custom types, see provided classes.
-
Array and Hash classes are extended with methods providing correct
behaviour with respect to categories. Enumerable module comes with
a lot of useful functions for working with lists and sets. See the
module documentation and the test suite for examples.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Development
Dependencies
Development
~> 12.3
Project Readme