export function failFunctionWithTag(tag: string) {
    return function fail(message: string) {
        throw new Error(`[${tag}] ${message}`);
    };
}

export function assertFunctionWithFail(fail: (message: string) => void) {
    return function assert(value: any, message: string) {
        if (!value) {
            fail(message);
        }
    };
}
