From c545be05eac243b58d4cc754eb58bae0ac5b259c Mon Sep 17 00:00:00 2001
From: rowan <rowan@kitsu.cafe>
Date: Thu, 17 Apr 2025 19:56:17 -0500
Subject: [PATCH] :3 im tired of typing these

---
 src/function.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/function.js b/src/function.js
index 057aa19..1ef3e02 100644
--- a/src/function.js
+++ b/src/function.js
@@ -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) => {