Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

:Re: collect-max for structs

11 views
Skip to first unread message

Robert L.

unread,
Nov 29, 2016, 1:59:08 PM11/29/16
to
> Unfortunately I don't think there's really any elegant way to solve
> your problem. It boils down to something like
>
> (loop with biggest-apple = (first *applelist*)
> for i in (rest *applelist*)
> do (when (> (apple-radius i) (apple-radius biggest-apple))
> (setf biggest-apple i))
> finally (return biggest-apple))


Ruby:

%w(a little more).max_by &:size

===>

"little"

In Forth?

--
[A]n unholy alliance of leftists, capitalists, and Zionist supremacists has
schemed to promote immigration and miscegenation with the deliberate aim of
breeding us out of existence in our own homelands.... [T]he real aim stays the
same: the biggest genocide in human history.... --- Nick Griffin
(https://www.youtube.com/watch?v=K0hD7IffTJs)
0 new messages