Re: Returning no value

Liste des GroupesRevenir à cl lisp 
Sujet : Re: Returning no value
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lisp
Date : 19. Jul 2024, 18:55:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240719095207.219@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-07-18, B. Pym <Nobody447095@here-nor-there.org> wrote:
Another way.
>
(define (foo) (let1 x (random-integer 10) (and (< 5 x) x)))
>
(filter-map (^_ (foo)) (iota 10))
 ===>
(7 8 9 6 6 7)

This is the TXR Lisp interactive listener of TXR 295.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
Please listen carefully to the following spec, as our Lisp has changed.
1> [keep-keys-if (op < 5) 0..10 (ret (rand 10))]
(9 9 7)
2> [keep-keys-if (op < 5) 0..10 (ret (rand 10))]
(6 8 8 7)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
19 Jul 24 * Re: Returning no value3B. Pym
19 Jul 24 +- Re: Returning no value1B. Pym
19 Jul 24 `- Re: Returning no value1Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal