Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bozo User
Newsgroups: rec.puzzles
Subject: Re: Lis(t|p) comprehensions
Date: Wed, 11 Sep 2024 07:04:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID:
References:
Injection-Date: Wed, 11 Sep 2024 09:04:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1ea0bff56ac37c439d06cfe74accd437";
logging-data="3659347"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Opa+b/grEIPCKnjRE2w5Q"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Km+gdg6Lr7aDK2W5oMjFY4kIwhQ=
Bytes: 1417
On 2024-09-08, B. Pym wrote:
>> > CL-USER> [x (x <- '(1 2 3)) (oddp x)]
>> > (1 3)
>> >
>> CL-USER> (loop for x in (list 1 2 3) when (oddp x) collect x)
>> (1 3)
>>
>> LOOP does some kind of list comprehension aswell, without an additional
>> software.
>
> Scheme:
>
> (filter odd? '(3 4 5))
> ===>
> (3 5)
>
> Does using CL cripple the brain, or does having a crippled brain
> cause one to use CL?
>
> If Lisp is to live, CL must die.
>
(defun filter (func lst)
(remove-if-not func lst))
( filter #'oddp '(3 4 5 ))
(3 5)