maybe: The Maybe Monad

The maybe type represents the possibility of some value or nothing. It is often used instead of throwing an error or returning `NULL`. The advantage of using a maybe type over `NULL` is that it is both composable and requires the developer to explicitly acknowledge the potential absence of a value, helping to avoid the existence of unexpected behaviour.

Getting started

Package details

AuthorAndrew McNeil [aut, cre]
MaintainerAndrew McNeil <andrew.richard.mcneil@gmail.com>
LicenseMIT + file LICENSE
Version1.1.0
URL https://github.com/armcn/maybe https://armcn.github.io/maybe/
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("maybe")

Try the maybe package in your browser

Any scripts or data that you put into this service are public.

maybe documentation built on Aug. 7, 2023, 5:11 p.m.