Simon Cozens wrote:
> (defun Schwartzian (func list)
>   (mapcar
>    (lambda (x) (car x))
>    (sort
>     (mapcar
>      (lambda (x) (cons x (funcall func x)))
>      list
>      )
>     (lambda (x y) (< (cdr x) (cdr y)))
>     )
>    )
>   )
> 
> Maybe you'd prefer this:
> 
> defun Schwartzian func list mapcar lambda x car x sort mapcar
> lambda x cons x funcall func x list lambda x y < cdr x cdr y
> 
> I know which I'd rather read.

Ok, you've proved that lisp doesn't make sense without all those
annoying parentheses.  Congratulations.  Fortunately, perl isn't lisp.

Why does removing the parens force you to jam everything together on two
lines?  The only reason I can think of is that you're using some fancy
autoindenting lisp editor.  Fortunately, perl doesn't force you to use a
special editor just to tame the obvious shortcomings of the language
syntax.

Perl *lets* you include parentheses, or not, whichever makes the code
easier to read.  Yeah, you can write ugly or broken code by leaving too
many out.  So?

-- 
Robert Mathews
Software Engineer
Excite@Home

Reply via email to