diff --git a/src/runtime-js.ts b/src/runtime-js.ts index ec3ce21..db04c8a 100644 --- a/src/runtime-js.ts +++ b/src/runtime-js.ts @@ -80,6 +80,7 @@ export const _rt = { return String(value); }, chars: (s: string) => s.split(''), + isWordChar: (s: string) => ({ _tag: /^\w$/.test(s) ? 'True' : 'False' }), // join: (delim: string) => (xs: string[]) => xs.join(delim), split: (delim: string) => (xs: string) => xs.split(delim), slice: (s: string | any[]) => (start: number) => (end: number) => s.slice(start, end),