Project Euler 4: Largest palindrome product in Functional Programming
For the cross product I used this code snippet:
https://stackoverflow.com/a/36234242

Slow as hell but seems to be fp with vanilla JS only:

/*jshint esversion: 6 */
(function () {
  'use strict';
  const isSymmetric = n =&gt; {
    const asString = n.toString();
    return asString === asString.split("")
      .reverse()
      .join("");
  };
  const range = num =&gt; Array.from(new Array(num), (_, i) =&gt; num - i);
  const from999To100 = range(999)
    .filter(x =&gt; x &gt;= 100);

  //https://stackoverflow.com/questions/12303989/cartesian-product-of-multiple-arrays-in-javascript/36234242#36234242
  const cartesianProduct = arr =&gt; arr.reduce(
    (a, b) =&gt; a.map(
      x =&gt; b.map(
        y =&gt; x.concat(y)))
    .reduce((a, b) =&gt; a.concat(b), []), [
      []
    ]);

  const combinations = cartesianProduct([
    from999To100, from999To100
  ]);
  const solution = combinations.map(x =&gt; x[0] * x[1])
    .filter(isSymmetric)
    .reduce((acc, x) =&gt; acc &lt; x ? x : acc, 0);
  console.log("solution ", solution);
})();