Consider this example:
You can use bind() to create a new function with the bound params;
//you can replace the param with anything you like, null is for the context var excludeFoos = exclude.bind(null,"foos") const foos = samples.filter(excludeFoos);
Live example here