Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

The naked truth of it is, I have no shirt. -- William Shakespeare, "Love's Labour's Lost"


comp / comp.lang.lisp / .Re: Sum of squares

SubjectAuthor
o .Re: Sum of squaresB. Pym

1
Subject: .Re: Sum of squares
From: B. Pym
Newsgroups: comp.lang.lisp
Organization: A noiseless patient Spider
Date: Fri, 7 Jun 2024 00:51 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (B. Pym)
Newsgroups: comp.lang.lisp
Subject: .Re: Sum of squares
Date: Fri, 7 Jun 2024 00:51:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <v3tliu$1of21$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Fri, 07 Jun 2024 02:51:43 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2047c75010e86b5b7ca3b027714c2e6b";
logging-data="1850433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+4teu+VZU4O51VE+buqAH"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:+qTEiI4ifxaLrk6fRpgu6U8Qjz4=
View all headers

> Define a procedure that takes three numbers as arguments and returns
> the sum of the squares of the two larger numbers.

Gauche Scheme:

Without sorting.

(define (sos . lst)
(apply + (map square (delete (apply min lst) lst))))

1

rocksolid light 0.9.8
clearnet tor