Deutsch   English   Français   Italiano  
<20240719095207.219@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.lisp
Subject: Re: Returning no value
Date: Fri, 19 Jul 2024 16:55:00 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <20240719095207.219@kylheku.com>
References: <v7c5g8$2kcte$1@dont-email.me>
Injection-Date: Fri, 19 Jul 2024 18:55:00 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="329fa895c5d6908477a80b789f62a073";
	logging-data="3237795"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+/nVys3aJNnrHlEEUEnH3o9v4Hb7wfhaM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:im0gimA9FRczsQI2NSAMk6z2QD0=
Bytes: 1501

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