I'm personally not aware of any eggs that specifically match your request.
But there are these eggs, which I tend to use more often than others:

Misc Macros <http://wiki.call-cc.org/eggref/4/miscmacros>
More Macros <http://wiki.call-cc.org/eggref/4/moremacros>
lookup-table <http://wiki.call-cc.org/eggref/4/lookup-table>
Sequences <http://wiki.call-cc.org/eggref/4/sequences>
SRFI-99 <http://wiki.call-cc.org/eggref/4/srfi-99>

Less general, but still often useful:
SRFI-45 <http://wiki.call-cc.org/eggref/4/srfi-45>
lazy-seq <http://wiki.call-cc.org/eggref/4/lazy-seq>

-Dan

On Wed, May 23, 2012 at 6:35 AM, Matt Welland <estifo...@gmail.com> wrote:

>  (port-map FN THUNK)
>
> where does the port go?
>
> I was sort of hoping for something like this to work:
>
> csi> (define inp (open-input-file "~/.bashrc"))
> csi> (define a (port-map inp read-line))
> csi> (close-input-file inp)
>
> but it took guessing to figure out the intended usage. How about some
> trivial examples in the docs?
>
> By trial and error I figured this out:
>
> (define a (with-input-from-file "~/.bashrc" (lambda ()(port-map (lambda
> (x) x) read-line))))
>
> That is ugly. I just want to get a file into a list:
>
> E.g. in Ruby:      foo=`cat ~/.bashrc`
>
> port-fold doesn't improve it:
>
> (define b (with-input-from-file "~/.bashrc" (lambda ()(reverse (port-fold
> cons '() read-line)))))
>
> Is there an egg or unit for down-n-dirty, get-the-job-done-yesterday,
> screw the "right thing" programming?
>
> (use ducttape)
> (define a (file->list "~/.bashrc"))
> ....
>
> Such a unit or egg deserves mention on the front page. I dug though the
> docs and never did find an easy way to do what I want.
>
> _______________________________________________
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to