Skip to content

LiberalArtist/functional

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Functional interfaces and datatypes for Racket

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Racket 100.0%