Skip to content

Commit

Permalink
Also simplify DF map implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
diogob committed Mar 10, 2024
1 parent 4693b3e commit 5942b8c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/domain-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,9 @@ function map<O, R>(
dfn: DomainFunction<O>,
mapper: (element: O) => R | Promise<R>,
): DomainFunction<R> {
return ((input, environment) =>
dfResultFromcomposable(
A.map(
A.composable(() => fromSuccess(dfn)(input, environment)),
mapper,
),
)()) as DomainFunction<R>
return dfResultFromcomposable(
A.map(A.composable(fromSuccess(dfn)), mapper),
) as DomainFunction<R>
}

/**
Expand Down

0 comments on commit 5942b8c

Please sign in to comment.