Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lexi-lambda/functional
Functional interfaces and datatypes for Racket
https://github.com/lexi-lambda/functional
Last synced: about 2 months ago
JSON representation
Functional interfaces and datatypes for Racket
- Host: GitHub
- URL: https://github.com/lexi-lambda/functional
- Owner: lexi-lambda
- License: isc
- Created: 2016-04-19T06:20:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-01T21:41:37.000Z (over 3 years ago)
- Last Synced: 2024-04-13T09:06:35.651Z (9 months ago)
- Language: Racket
- Size: 75.2 KB
- Stars: 42
- Watchers: 3
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-racket-and-scheme - functional
README
# functional [![Build Status](https://travis-ci.org/lexi-lambda/functional.svg?branch=master)](https://travis-ci.org/lexi-lambda/functional) [![Coverage Status](https://coveralls.io/repos/github/lexi-lambda/functional/badge.svg?branch=master)](https://coveralls.io/github/lexi-lambda/functional?branch=master)
This library provides **functional programming utilities** for Racket, including interfaces, such as functors and monads, and common data types that implement those interfaces, such as maybe and either.
Here’s an example of performing monadic computations using `functional`:
```racket
#lang racket(require data/applicative
data/monad
data/maybe)(define try-bytes->string/utf8
(curry exn->maybe exn:fail:contract? bytes->string/utf-8))(define input-char-length
(do [str <- (try-bytes->string/utf-8 (port->bytes))]
(pure (length str))))
```[**For more information, see the documentation.**][functional-doc]
[functional-doc]: http://docs.racket-lang.org/functional/index.html