:3 im tired of typing these
This commit is contained in:
parent
0f2577167f
commit
c545be05ea
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import { curry, curryN } from './curry.js'
|
||||
import { dispatch } from './fantasy-land.js'
|
||||
import { concat as iconcat, isIterable, iter } from './list.js'
|
||||
import { concat as iconcat, isIterable, iter, tail } from './list.js'
|
||||
|
||||
/** @import { Fn, Morphism, InferredMorphism, Predicate } from './types.js' */
|
||||
|
||||
|
@ -20,7 +20,7 @@ export const tap = curry((f, x) => {
|
|||
* @param {...Fn} fns
|
||||
* @returns {(x: any) => any}
|
||||
*/
|
||||
export const pipe = ([f, ...fns]) => (...args) => fns.reduce((v, f) => f(v), f(...args))
|
||||
export const pipe = (...fns) => (...args) => tail(fns).reduce((v, f) => f(v), head(fns)(...args))
|
||||
|
||||
export const concat = dispatch(['fantasy-land/concat', 'concat'],
|
||||
(b, a) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue