You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

8 lines
247 B

import { filter } from './filter.js'
import { includes } from './includes.js'
export function intersection(listA, listB){
if (arguments.length === 1) return _list => intersection(listA, _list)
return filter(x => includes(x, listA), listB)
}