Hyperlinkv0.8.0-beta.28

Function

Function.constTrueconsteffect/Function.ts:345
(): boolean

Returns true when called.

When to use

Use when you need a thunk that returns true on every invocation.

Example (Returning true from a thunk)

import { Function } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(Function.constTrue(), true)
constants
export const constTrue: LazyArg<boolean> = constant(true)
Referenced by 7 symbols