import { applyEnvironment } from "https://deno.land/x/domain_functions@v2.6.0/src/domain-functions.ts";
Takes a function with 2 parameters and partially applies the second one. This is useful when one wants to use a domain function having a fixed environment.
Examples
import { mdf, applyEnvironment } from 'domain-functions'
import { mdf, applyEnvironment } from 'domain-functions'
const endOfDay = mdf(z.date(), z.object({ timezone: z.string() }))((date, { timezone }) => ...) const endOfDayUTC = applyEnvironment(endOfDay, { timezone: 'UTC' }) // ^? (input: unknown) => Promise<Result>
Parameters
df: Fn