Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!csusac!zimmer!rat!kestrel.edu!mcdonald
From: mcdonald@kestrel.edu (Jim McDonald)
Subject: Re: Tcl/Lisp/Python: A "User" point of view
Message-ID: <1994Oct6.015112.642@kestrel.edu>
Sender: mcdonald@kestrel.edu (Jim McDonald)
Organization: Kestrel Institute, Palo Alto, CA
References: <9409232314.AA29957@mole.gnu.ai.mit.edu> <BLUME.94Oct1153023@beth.cs.princeton.edu> <BEVAN.94Oct4170833@lemur.cs.man.ac.uk> <Cx6HG6.Mvp@eskimo.com> <36tl8a$ede@agate.berkeley.edu>
Date: Thu, 6 Oct 1994 01:51:12 GMT
Lines: 43


In article <36tl8a$ede@agate.berkeley.edu>, luigi@paris.CS.Berkeley.EDU (Luigi Semenzato) writes:
|> In article <Cx6HG6.Mvp@eskimo.com>, Miles Bader <miles@eskimo.com> wrote:
|> 
|> |>Here's the dylan version (given that the original examples all returned a
|> |>descending list):
|> |>
|> |>  as(<list>, range(from: 10000, to: 0, by: -1))
|> |>
|> |>or if you want a loop:
|> |>
|> |>  for (i from 0 to 10000, list = #() then add!(list, i))
|> |>  finally list
|> |>  end;
|> 
|> If this contest is open to all languages, then Common Lisp,
|> with the loop macro, is hard to beat:
|> 
|> 	(loop for i from 0 to 10000 collect i)
|> 
|> It's unlispish, but convenient.  ---Luigi

I missed the start of this thread, but in Refine one would get
the sequence of integers from 0 to 10000 with the expression

  [0 .. 10000]

or the corresponding set with

  {0 .. 10000}

I imagine other languages have equally terse expressions.






-- 
James McDonald
Kestrel Institute                       mcdonald@kestrel.edu
3260 Hillview Ave.                      (415) 493-6871 ext. 339
Palo Alto, CA 94304                fax: (415) 424-1807
