[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pretty-lambdas

Luke Gorrie writes:
> I just want to mention a simple and good-enough-for-me solution to the
> "lambda is too many characters" problem: have Emacs "fontify" the
> string "lambda" as a lambda character. Then it uses less screen space
> even than 'fn'.

Thank you very much for forwarding this tidbit; it delights me.

> You need to have an appropriate font installed - more on that in the
> usenet thread that comes up first on a search for "pretty lambda" at
> groups.google.com. I don't know if this works on Emacsen other than
> GNU version 21.

It doesn't work in "21.4 (patch 6) "Common Lisp" XEmacs Lucid", but it
does indeed work in GNU Emacs 21.  (My Greek font looks hideous,

I still think (\ (x) (format t "~A~%" x)) takes too much space to
remove the need for macros like 'dolist'.  Compare:

(dolist (x list) (format t "~A~%" x))
(mapcar (lambda (x) (format t "~A~%" x)) list)  ; too verbose
(mapcar (\ (x) (format t "~A~%" x)) list)       ; still too verbose
(mapcar {format t "~A~%" #1} list )    ; Mathematica's lambda syntax
mapcar (format t "~A~%") list          ; in almost-ML

<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Edsger Wybe Dijkstra died in August of 2002.  The world has lost a great
man.  See http://advogato.org/person/raph/diary.html?start=252 and
http://www.kode-fu.com/geek/2002_08_04_archive.shtml for details.