List comprehensions: Difference between revisions

→‎JS ES6: dropped one redundant function ( drop )
(→‎JS ES6: dropped one redundant function ( drop ))
Line 1,011:
// concatMap :: (a -> [b]) -> [a] -> [b]
const concatMap = (f, xs) => [].concat.apply([], xs.map(f));
 
// drop :: Int -> [a] -> [a]
const drop = (n, xs) => xs.slice(n);
 
// enumFromTo :: Int -> Int -> [Int]
9,659

edits