Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
List comprehensions for Lisp
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sven-Olof Nystrom  
View profile  
 More options Aug 27 2003, 2:20 pm
Newsgroups: comp.lang.lisp
From: Sven-Olof Nystrom <s...@h201n2fls305o851.telia.com>
Date: Wed, 27 Aug 2003 18:19:52 GMT
Local: Wed, Aug 27 2003 2:19 pm
Subject: List comprehensions for Lisp

I've written an implementation of list comprehensions for Common
Lisp. My implementation also allows manipulation of hash tables and
arrays.

Documentation and source code can be downloaded at
<http://www.csd.uu.se/~svenolof/collect.tar.gz>.

Sven-Olof Nystrom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacek Generowicz  
View profile  
 More options Aug 28 2003, 5:12 am
Newsgroups: comp.lang.lisp
From: Jacek Generowicz <jacek.generow...@cern.ch>
Date: 28 Aug 2003 10:37:21 +0200
Local: Thurs, Aug 28 2003 4:37 am
Subject: Re: List comprehensions for Lisp

Sven-Olof Nystrom <s...@h201n2fls305o851.telia.com> writes:
> I've written an implementation of list comprehensions for Common
> Lisp. My implementation also allows manipulation of hash tables and
> arrays.

> Documentation and source code can be downloaded at
> <http://www.csd.uu.se/~svenolof/collect.tar.gz>.

Taking the first example in your docs:

  (collect (list) ((* x x))
    (in (x) '(1 2 3 4 5 6 7 8)))

Is there a good reason for preferring this over

  (collect list (* x x)
    (in (x) '(1 2 3 4 5 6 7 8)))

In other words, do the parentheses in

  <type-exp> ::= (nil) | (t) | (list) | (vector)

and those in <exp>, sereve any good purpose ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sven-Olof Nystrom  
View profile  
 More options Aug 31 2003, 4:47 am
Newsgroups: comp.lang.lisp
From: Sven-Olof Nystrom <svenolof...@telia.com>
Date: Sun, 31 Aug 2003 08:47:19 GMT
Local: Sun, Aug 31 2003 4:47 am
Subject: Re: List comprehensions for Lisp

Sure.

If we are only interested in working with lists and (one-dimensional)
arrays, the syntax you suggest is sufficient. However, if we want to
collect the result in a hash table, we want to say how the values with
a particular key are o be collected. For example:

(collect (hash-table (vector)) ((mod x 2) x)
  (in (x) '(1 2 3 4 5 6)))

Here, all values with the same key are collected in a vector. The
collect expression generates a sequence of key-value pairs (the key
given by (mod x 2)). Thus, the result of the collect expression is
(under clisp):

#S(HASH-TABLE EQL (0 . #(2 4 6)) (1 . #(1 3 5)))

Sven-Olof


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Smith  
View profile  
 More options Aug 31 2003, 9:54 am
Newsgroups: comp.lang.lisp
From: eric3...@yahoo.com (Eric Smith)
Date: 31 Aug 2003 06:54:34 -0700
Local: Sun, Aug 31 2003 9:54 am
Subject: Re: List comprehensions for Lisp

Sven-Olof Nystrom <s...@h201n2fls305o851.telia.com> wrote in message <news:m3bruaboq9.fsf@h201n2fls305o851.telia.com>...
> I've written an implementation of list comprehensions for Common

How is this fundamentally different from
the list functionality provided by standard
Common Lisp?  If I use dolist, loop, the
various kinds of map, etc., instead of your
list comprehensions, am I missing something
fundamental without understanding what I'm
missing?  Is there some kind of powerful
idea in this, or is it more of a convenience
for those who detest loop?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Golden  
View profile  
 More options Aug 31 2003, 1:02 pm
Newsgroups: comp.lang.lisp
From: david.gol...@oceanfree.net (David Golden)
Date: 31 Aug 2003 10:01:59 -0700
Local: Sun, Aug 31 2003 1:01 pm
Subject: Re: List comprehensions for Lisp

Sven-Olof Nystrom <s...@h201n2fls305o851.telia.com> wrote in message <news:m3bruaboq9.fsf@h201n2fls305o851.telia.com>...
> I've written an implementation of list comprehensions for Common
> Lisp. My implementation also allows manipulation of hash tables and
> arrays.

> Documentation and source code can be downloaded at
> <http://www.csd.uu.se/~svenolof/collect.tar.gz>.

> Sven-Olof Nystrom

Does this relate to the old SERIES stuff or is it something else?
http://www-2.cs.cmu.edu/Groups/AI/html/cltl/clm/node347.html

What's happened to http://series.sourceforge.net/ -
actual tarballs of series no longer seem to be there.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sven-Olof Nystrom  
View profile  
 More options Aug 31 2003, 2:39 pm
Newsgroups: comp.lang.lisp
From: Sven-Olof Nystrom <svenolof...@telia.com>
Date: Sun, 31 Aug 2003 18:39:39 GMT
Local: Sun, Aug 31 2003 2:39 pm
Subject: Re: List comprehensions for Lisp

david.gol...@oceanfree.net (David Golden) writes:
> Does this relate to the old SERIES stuff or is it something else?
> http://www-2.cs.cmu.edu/Groups/AI/html/cltl/clm/node347.html

No, it is not based on the series library (and I was not aware of the
series library before your post.)

Sven-Olof


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google