February 2018
— Thanks
Source:
let l = [1,2,2,3,3,3,4,4];const remove = (list, x) => list.includes(x) && list.filter((_, y) => list.indexOf(x) !== y, 1); l = remove(l, 4);
[ 1, 2, 2, 3, 3, 3, 4 ]
— Slightly messy
— Ew semicolon ew
— Source:
let l = [1,2,2,3,3,3,4,4];const remove = (list, x) => R.without([ x ], list);l = remove(l, 4);
[ 1, 2, 2, 3, 3, 3 ]
Message permanent page
— Semicolons are sexy
— Where is R come from?
— Built in thingy?
— Looks nice
— Http://ramdajs.com/
— inchidi
— True I wanna put them in places where no human had physical access to on my body