Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/actor/main/lookup.ts>Lookup.create

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Lookup.create
import { Lookup } from "https://deno.land/x/rimbu@0.14.0/actor/main/lookup.ts";
const { create } = Lookup;

Returns a reducer that implements a lookup algorithm based on the given configuration.

Parameters

initState: OptLazy<S>
  • the initial state for the lookup
lookup: Lookup<R, F>
  • the lookup definition
applyLookupValue: Lookup.Updater<S, R>
  • function used to update the given state with the given action and looup value
applyFallback: Lookup.Updater<S, F>