isWordChar

This commit is contained in:
Dustin Swan 2026-03-15 20:08:34 -06:00
parent fcce2ac4c0
commit 78fa27f70a
No known key found for this signature in database
GPG key ID: 30D46587E2100467

View file

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