This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: readdir
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: readdir
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 08 Jun 2000 02:58:37 +0200
- Cc: "Peter C. Norton" <spacey at lenin dot nu>, Guile Mailing List <guile at sourceware dot cygnus dot com>
- Cc: djurfeldt at nada dot kth dot se
- References: <Pine.LNX.4.21.0006080230020.8462-100000@marvin.ida.ing.tu-bs.de>
Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
> I felt that guile users might be disappointed because of the seemingly
> enormous efforts in order to achieve something that perl does in three
> lines of code. Thus, I took a different approach and wrote a more
> tutorial style thingy about how to arrive at a point where you could
> simply write the following line in guile:
>
> (sort (grep "^[^.]" (directory->list ".")) string<?)
As Marius would say: "buutiful!" :-)
I think we should learn from your example. While it's interesting to
make plain translations of Perl code, it's way better to demonstrate
true Scheme power!