Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!yale!gumby!newsxfer.itd.umich.edu!newsxfer3.itd.umich.edu!howland.erols.net!netcom.com!vfr750
From: vfr750@netcom.com (Will Hartung)
Subject: Re: Bad Idiom?
Message-ID: <vfr750E3pDqF.61K@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <vfr750E3oAzr.I5@netcom.com>
Date: Wed, 8 Jan 1997 18:51:51 GMT
Lines: 62
Sender: vfr750@netcom3.netcom.com

vfr750@netcom.com (Will Hartung) writes:

(Hey! That's ME! What's HE doing here??)

[ Previous post snipped for brevity ]

Wow! You think its bad here, you should see my mail!

Anyway, thanx all for pointing the way with your posts and e-mail.

I think (I need to look at it a bit more) that LABELS is what I was
looking for. LABELS makes the could look much cleaner. I thought the
routine looked rather ugly. Besides, it didn't even work! (Worked
great for ONE item :-)).

I know that the function I presented works suspiciously like MAPCAR
(Thanx Rainer!), but I was trying to understand how the "helper
function" idiom translated from Scheme to Lisp.

I use that concept all over the place in Scheme stuff.

I noticed that in ANSI Common Lisp that Paul writes two functions
(compress and compr, compr being the "helper" of compress) whereas in
most Scheme texts, they seem to bundle them together. I'm assuming
that Paul didn't bundle them together because he'd have to introduce
LABELS and FLET much earlier for this example.

Recursive functions are great at building and tearing apart lists, but
I have to wonder if one of the iteration constructs is also useful for
building lists? I'm guessing that LOOP might be able to handle it, Paul
spends 3 pages describing LOOP in his CL reference, and its pretty
clearly a Quick Reference.

But would a Compiler make a more efficient construct using LOOP than a
similiar tail-recursive technique? I would imagine that something that
is (somewhat) intuitive in a recursive function may not translate to
well to the LOOP macro.

I guess the real question is whether the LOOP macro is worth studying,
or should I just skip it and rely on the other contructs and
techniques that I've learned from Scheme and the simpler functions
available in Lisp?

It's difficult at this point because I feel like I'm walking on eggs. I
question everything I'm doing. Am I doing the right thing? Is this the
best way? CL is so big, I feel like I'm always missing something.
Perhaps I should just shut up, write my little projects and then find
some soul willing to kibitz the code after it works. 

But working with CL is like walking into the local warehouse hardware
store looking for a hammer, and upon entering the tool section, not only
do I find a WALL of hammers, but walls of everything else as well.

"Everyday it's the same thing. Variety! I want something different."

But thanx again everyone for your responses. I really appreciate it
all, its very helpful.

-- 
Will Hartung - Rancho Santa Margarita. It's a dry heat. vfr750@netcom.com
1990 VFR750 - VFR=Very Red    "Ho, HaHa, Dodge, Parry, Spin, HA! THRUST!"
1993 Explorer - Cage? Hell, it's a prison.                    -D. Duck
