Multiplication tables: Difference between revisions
m
→JS ES6
(→{{header|JavaScript}}: Added ES6 version) |
m (→JS ES6) |
||
Line 2,648:
const multTable = (m, n) => {
const xs = enumFromToInt(m, n);
return
...concatMap(
x => [
)]
],
xs
)
};
Line 2,696 ⟶ 2,698:
// concatMap :: (a -> [b]) -> [a] -> [b]
const concatMap = (f, xs) => [].concat.apply([], xs.map(f));
// enumFromToInt :: Int -> Int -> [Int]
|