Re: [newbie] I need a function for read user input.

Liste des GroupesRevenir à cl scheme 
Sujet : Re: [newbie] I need a function for read user input.
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 14. Sep 2024, 00:59:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc2g58$12ukb$2@dont-email.me>
User-Agent : XanaNews/1.18.1.6
Gareth McCaughan wrote:

    (loop for word = (read input nil) while word collect word)
 
which even the strictest LOOP-hater would have to agree
is clearer.

It's shorter in Gauche Scheme:

(use gauche.generator)

(generator->list (cut  read input))


Another way:

(use srfi-42) ; list-ec

(list-ec (:port word input) word)


Another way.

(lope doport word read port  collecting word)

Date Sujet#  Auteur
14 Sep00:59 o Re: [newbie] I need a function for read user input.1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal