since import { Predicate } from 'fp-ts/lib/function' ; import { NonEmptyArray } from 'fp-ts/lib/NonEmptyArray' ; import * as O from 'fp-ts/lib/Option' ; example since export const match = ( r ) => ( s ) => O . fromNullable ( s . match ( r ) ) ; example since export const test = ( r ) => ( s ) => { const lastIndex = r . lastIndex ; const res = r . test ( s ) ; r . lastIndex = lastIndex ; return res ; } ; example since export const sub = ( r , replacement ) => ( s ) => s . replace ( r , replacement ) ; example since export const split = ( r ) => ( s ) => s . split ( r ) as any ;