experiments = [
{ name: "map cube", run: () => math.map(A, math.cube) },
{ name: "math dotPow", run: () => math.dotPow(A, 3) },
{ name: "parser cube", run: () => parser.evaluate("a.^3") },
{ name: "map cube callback", run: () => math.map(A, (x) => math.cube(x)) },
{
name: "map Math cube callback",
run: () => math.map(A, (x) => Math.pow(x, 3))
},
{
name: "flat map",
run: () => flatMap(A, (x) => math.cube(x))
},
{ name: "map recurse", run: () => recurseMap((x) => Math.pow(x, 3), A) },
{
name: "map recurse forEach",
run: () => recurseForEach((x) => Math.pow(x, 3), A)
},
{ name: "typed map", run: () => typedMap(math.cube, A) },
{ name: "typed map trick", run: () => typedMap1(math.cube, A) },
{
name: "map signature implementation",
run: () => math.map(A, math.typed.resolve(math.cube, [0.1]).implementation)
}
]