method R.fnimport { R } from "https://deno.land/x/ahh@v0.10.3/src/result/mod.ts"; fn<T, E extends Error>(f: () => T): Result<T, E>Calls f and returns the result as an Ok, or returns an Err if it throws. ExamplesExample 1 import { R } from "./mod.ts"; console.log(R.fn(() => 1)); // 1 console.log(R.fn(() => { throw Error(); })); // Error() Type ParametersTE extends ErrorParametersf: () => TReturnsResult<T, E>