diff --git a/src/core/utilities/functions.ts b/src/core/utilities/functions.ts index ab67f99..18df085 100644 --- a/src/core/utilities/functions.ts +++ b/src/core/utilities/functions.ts @@ -1,14 +1,6 @@ import * as Files from '../module-loading/readFile'; import { basename } from 'path'; import { Err, Ok } from 'ts-results-es'; -/** - * A function that returns whatever value is provided. - * Warning: this evaluates { @param value }. It does not defer a value. - * @param value - * @__PURE__ - */ -// prettier-ignore -export const _const = (value: T) => () => value; /** * * @param modName @@ -19,8 +11,8 @@ export function nameOrFilename(modName: string | undefined, absPath: string) { } //function wrappers for empty ok / err -export const ok = _const(Ok.EMPTY); -export const err = _const(Err.EMPTY); +export const ok = () => Ok.EMPTY; +export const err = () => Err.EMPTY; export function partition(arr: (T & V)[], condition: (e: T & V) => boolean): [T[], V[]] { const t: T[] = [];