Re: Coding challenge! non-destructuve matrix transpose
- From: Marco Antoniotti <marcoxa@xxxxxxxxx>
- Date: Thu, 18 Sep 2008 00:58:15 -0700 (PDT)
On Sep 18, 7:34 am, namekuseijin <namekusei...@xxxxxxxxx> wrote:
On 18 set, 01:54, "John Thingstad" <jpth...@xxxxxxxxx> wrote:
På Thu, 18 Sep 2008 05:57:00 +0200, skrev jrwats <jrw...@xxxxxxxxx>:
Hi all - this is not for a school project or anything (I'm a full-
timer at the software company ppl love to hate), but I was trying to
do an exercise in the back of ch 6 of Wilensky's book, Comon
LISPcraft. Anyway the challenge is to code up the solution to the
transposition of a matrix (with the underlying implementation being a
list - not a 2d - that is of course too easy). My solution was a
DESTRUCTIVE one which actually accumulates and REMOVES 1st column of...
(defun matrix-transpose (matrix)
"Turn a matrix on its side."
(if matrix (apply #'mapcar #'list matrix)))
Party pooper. Well, at least he may have some fun reimplementing
mapcar or list...
Isn't that what they did with Ruby and other SLDJs?
Cheers
--
Marco
.
- References:
- Coding challenge! non-destructuve matrix transpose
- From: jrwats
- Re: Coding challenge! non-destructuve matrix transpose
- From: John Thingstad
- Re: Coding challenge! non-destructuve matrix transpose
- From: namekuseijin
- Coding challenge! non-destructuve matrix transpose
- Prev by Date: Re: Coding challenge! non-destructuve matrix transpose
- Next by Date: Re: Coding challenge! non-destructuve matrix transpose
- Previous by thread: Re: Coding challenge! non-destructuve matrix transpose
- Next by thread: How apply #'mapcar #'list matrix works?
- Index(es):
Relevant Pages
|