All Projects → lexi-lambda → Functional

lexi-lambda / Functional

Functional interfaces and datatypes for Racket

Programming Languages

racket
414 projects

functional Build Status Coverage Status

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:

#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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].