Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/option.ts>wrap

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

Create an Option by wrapping any value A in Some.

Examples

Example 1

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

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