function lift
thefrontside/effectionfunction lift<TArgs extends unknown[], TReturn>(fn: (…args: TArgs) => TReturn): (…args: TArgs) => Operation<TReturn>
Convert a simple function into an https://effection-www-jctyb5nxhzq0.deno.dev/api/v4/lift/Operation
Examples
Example 1
let log = lift((message) => console.log(message));
export function* run() {
yield* log("hello world");
yield* log("done");
}
Type Parameters
TArgs extends unknown[]
TReturn
Parameters
fn: (...args: : TArgs) => TReturn
Return Type
(...args: : TArgs) => https://effection-www-jctyb5nxhzq0.deno.dev/api/v4/lift/Operation<TReturn>
a function returning an operation that invokes fn
when evaluated