[erlang-questions] re moving nth element from a list

Richard A. O'Keefe <>
Thu Jun 26 06:06:03 CEST 2008


On 25 Jun 2008, at 11:08 pm, Anupam Kapoor wrote:
> ,----
> | Eh?  The vector cross product is only defined for 3-dimensional  
> space,
> `----
> it is defined for n-dimensional vectors too.

WEDGE product is defined for n-dimensional vectors
(basically the antisymmetric part of the tensor product),
but CROSS product is not.

Since this is the operation you wanted 'remove the kth element
from a list' for, what exactly is it that you are calling a
cross product?         ^^^^^^^

For real fun, write an Erlang function that takes
a numeric vector, such as [1,2,0,3,0,4], generates
a special purpose dot-function

	fun ([X,Y,_,Z,_,W]) -> X+2*Y+3*Z+4*W end

and compiles it.




More information about the erlang-questions mailing list