Vector products: Difference between revisions
Content added Content deleted
m (→JS ES6) |
m (→JS ES6) |
||
Line 1,885: | Line 1,885: | ||
console.log(unlines( |
console.log(unlines( |
||
zipWith(k => f => k + show( |
zipWith(k => f => k + show( |
||
saturated(f)([a, b, c]) |
|||
))(['a . b', 'a x b', 'a . (b x c)', 'a x (b x c)'])( |
))(['a . b', 'a x b', 'a . (b x c)', 'a x (b x c)'])( |
||
[dotProduct, crossProduct, scalarTriple, vectorTriple] |
[dotProduct, crossProduct, scalarTriple, vectorTriple] |
||
Line 1,929: | Line 1,929: | ||
) : undefined; |
) : undefined; |
||
// Curried function -> |
// Curried function -> [Argument] -> a more saturated value |
||
const |
const saturated = f => |
||
// A curried function applied to |
// A curried function applied successively to |
||
// arguments up to, but not beyond, |
// a list of arguments up to, but not beyond, |
||
// the point of saturation. |
// the point of saturation. |
||
args => 0 < args.length ? ( |
args => 0 < args.length ? ( |