Skip to main content
Module

x/fun/option.ts>of

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function of
import { of } from "https://deno.land/x/fun@v2.0.0-alpha.10/option.ts";

Create an Option by wrapping any value A in Some.

Examples

Example 1

import * as O from "./option.ts";

const result1 = O.of(1); // Some(1)
const result2 = O.of("Hello"); // Some("Hello")