typescript(option): fix: compL was only used once so it wasn't worth the bundle sacrifice
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
a32f62cfc6
commit
dcd55c5047
|
@ -1,11 +1,10 @@
|
|||
import { match } from './match'
|
||||
import { Mapper } from '../internalTypes'
|
||||
import { Option, Some, None } from '../types'
|
||||
import { compL } from '@thi.ng/compose'
|
||||
|
||||
export const map = <T, U>(
|
||||
mapper: Mapper<T, U>,
|
||||
option: Option<T>
|
||||
): Option<U> => {
|
||||
return match(compL(mapper, Some), None, option)
|
||||
return match(v => Some(mapper(v)), None, option)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue