diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-14 19:10:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-14 19:23:59 +0530 |
| commit | b5893d68ce4eacbc3ae431ca48f821657236c7aa (patch) | |
| tree | 3bf215c9ff226fbe1363069fcc63ca22ea5417c7 /src/index.ts | |
| parent | de5d3de99afae3cb7f1dc56fe8781394f8614a50 (diff) | |
| download | elxr-b5893d68ce4eacbc3ae431ca48f821657236c7aa.tar.gz elxr-b5893d68ce4eacbc3ae431ca48f821657236c7aa.zip | |
refactor: refactors imports + formatting
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/index.ts b/src/index.ts index 6c19fd3..5bcb4f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ -import { getOrElseW, map } from 'fp-ts/lib/Either' -import { flow, pipe } from 'fp-ts/lib/function' -import { fst } from 'fp-ts/lib/Tuple' +import * as Either from 'fp-ts/Either' +import { flow, pipe } from 'fp-ts/function' +import { fst } from 'fp-ts/Tuple' import * as ev from './eval' import { parser } from './parser' import { ListExpr } from './types' @@ -11,8 +11,8 @@ const toSourceString = (r: string | RegExp): string => export const liexp: (r: string | RegExp) => ListExpr = flow( toSourceString, parser, - map(fst), - getOrElseW(([e, _]) => { + Either.map(fst), + Either.getOrElseW(([e, _]) => { throw new Error(e) }), ) |
