Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will soon meet a person who will play an important role in your life.


comp / comp.lang.scheme / Re: "Higher Order Perl" book and Lisp

SubjectAuthor
o Re: "Higher Order Perl" book and LispB. Pym

1
Subject: Re: "Higher Order Perl" book and Lisp
From: B. Pym
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Mon, 2 Sep 2024 19:48 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Nobody447095@here-nor-there.org (B. Pym)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: "Higher Order Perl" book and Lisp
Date: Mon, 2 Sep 2024 19:48:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vb54qh$2viln$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Mon, 02 Sep 2024 21:48:36 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a435632fcbba468531e98d5e4c12abf8";
logging-data="3132087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cPOdoUmaHe6jVuPPai/p8"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:Qz3bUIUQvjVtj2dqXIrjSqA9+HA=
View all headers

> >>(loop for i from 0 to 100 with c = 0 finally (return c) do
> >> (loop for d across (format nil "~A" i) do (when (char= d #\5) (incf c))))
> >
> >
> > How about:
> >
> > (loop for i from 0 to 100 sum (count #\5 (princ-to-string i)))
> >
>
> (count #\5 (format nil "~{~A~}" (loop for i to 100 collect i)))

Gauche Scheme

(use srfi-13) ;; string-count

(string-count (x->string (iota 100)) #\5)
===>
20

1

rocksolid light 0.9.8
clearnet tor