Sign in
chromium
/
devtools
/
devtools-frontend
/
refs/heads/main
/
.
/
node_modules
/
rambda
/
src
/
zipWith.js
blob: 4f6415747e675397c52940dba1786f3bf2597831 [
file
] [
log
] [
blame
] [
edit
]
import
{
curry
}
from
'./curry.js'
import
{
take
}
from
'./take.js'
function
zipWithFn
(
fn
,
x
,
y
){
return
take
(
x
.
length
>
y
.
length
?
y
.
length
:
x
.
length
,
x
).
map
((
xInstance
,
i
)
=>
fn
(
xInstance
,
y
[
i
]))
}
export
const
zipWith
=
curry
(
zipWithFn
)