Skip to main content
Module

x/fun/mod.ts>option.isSome

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

Tests wether an Option is Some, returning true if the passed option is Some and false if it is None.

Examples

Example 1

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

const result1 = O.isSome(O.none); // false
const result2 = O.isSome(O.some(1)); // true