Re: mapcar use.



"lispuser" <amit_h123@xxxxxxxxxxx> writes:

Hello all,
I am trying to use the mapcar function for the multiplication of 2
lists as :
(1 2) and (4 5 6)
so that the result which i get is
as
((4 5 6) (8 10 12))
I am still not gettin how to use eval and mapcar to achieve this...
Can somebody help me...
thanks

From age 6 to age 18, I was taught in math that you can multiply
cardinals, integers, rationals, decimals, reals, complex, and
matrices. I heard that there are some other kind of numbers, named
quaternions and octonions. And I've been taught about scalar product
and external product which allow some kind of "multiplication" of
vectors. I addition, I've been advised to avoid multiplicating (and
comparing either) apples with oranges.

But I've no idea what the multiplication of two lists can be!

I suspect that you don't have a clear idea of what you mean either.
When you know what you're speaking of, the algorithm and lisp function
is usually a mere and direct transcription.

If you can explain us what you mean by multiplying two lists, perhaps
we could help.

list-× : L × L ----> ???
(l1,l2) |---> ???

--
__Pascal Bourguignon__ http://www.informatimago.com/

HANDLE WITH EXTREME CARE: This product contains minute electrically
charged particles moving at velocities in excess of five hundred
million miles per hour.
.



Relevant Pages

  • Re: mapcar use.
    ... I am trying to use the mapcar function for the multiplication of 2 ... lists as: ... Thomas A. Russ, USC/Information Sciences Institute ...
    (comp.lang.lisp)
  • Re: mapcar use.
    ... I am trying to use the mapcar function for the multiplication of 2 ... lists as: ... (let ((res nil)) ... lovely one-liners :-) ...
    (comp.lang.lisp)
  • Re: Im dreading the teacher conference
    ... Children are taught the ... pencil and paper, but with movable letters, copying from cards with ... have the *lists* he and a friend used to write in preK ... ...
    (misc.kids)