[Top][All Lists]

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

Re: request for a new function, say, `sequence'

From: Kenichi Handa
Subject: Re: request for a new function, say, `sequence'
Date: Tue, 25 Mar 2003 14:40:07 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, "Satyaki Das" <address@hidden> writes:
>>  (defun dev-charseq (from &optional to)
>>    (if (null to) (setq to from))
>>    (mapcar (function (lambda (x) (indian-glyph-char x 'devanagari)))
>>            (devanagari-range from to)))

> I would have written it as follows:

> (defun dev-charseq (lower &optional upper)
>   (if (null upper) (setq upper lower))
>   (loop for x from lower to upper
>         collect (indian-glyph-char x 'devanagiri)))

> I changed "from" to "lower" and "to" to "upper" since the loop
> looks sort of funny otherwise.

It's not the point.  How to use a list returned by `range'
(or `sequence') and how to make such a list is a different

Of course, we can implement the functionality of `range' by
using loop, while, dotimes, etc.  But, it doesn't mean that
we don't need a simpler/convenient function `range'.

> I did a grep through the sources and there are 118 files that
> already contain the line,
>   (eval-when-compile (require 'cl))

How many of them are preloaded?

Ken'ichi HANDA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]