deno.land / x / rambda@v9.1.1 / src / union.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { cloneList } from './_internals/cloneList.js'import { includes } from './includes.js'
export function union(x, y){ if (arguments.length === 1) return _y => union(x, _y)
const toReturn = cloneList(x)
y.forEach(yInstance => { if (!includes(yInstance, x)) toReturn.push(yInstance) })
return toReturn}
rambda

Version Info

Tagged at
2 months ago