javascript

DanielFGray

·

partition

·

JavaScript

·

Total Size: 130 B

·

·

Created: 7 months ago

·

Edited: 7 months ago

const partition = (fn, l) => l.reduce(([t, f], c) => ( fn(c) ? [t.concat([c]), f] : [t, f.concat([c])] ), [[],[]])

1 bit

163 views

Are you sure you want to delete?