Amirouche Boubekki (2016-03-06 17:12 +0300) wrote:

> Héllo,

Hi there!

> I share with you this small *atom* feed reader which works from command
> line. Create a ~/.prime.txt file with the address of atom files you want
> to follow and then run the script.
>
> The problem I have is that it fails on wingolog and others but I'm
> accepting patches ;)

> (use-modules (srfi srfi-9))
> (use-modules (srfi srfi-19))
> (use-modules (srfi srfi-26))

> (use-modules (ice-9 match))
> (use-modules (ice-9 rdelim))
> (use-modules (ice-9 receive))

> (use-modules (sxml xpath))
> (use-modules (sxml simple))

> (use-modules (srfi srfi-1))

> (use-modules (web client))

Why do you use 'use-modules' for every module instead of:

  (use-modules (srfi srfi-1)
               (srfi srfi-9)
               ...)

[...]
> ;;; sxml procedures

> (define (file->sxml filename)
>   (cdr (xml->sxml (with-input-from-file filename
>                     (lambda ()
>                       (read-string))))))

No need in lambda here, just: (with-input-from-file filename read-string)

-- 
Alex

Reply via email to