Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: HenHanna Newsgroups: comp.lang.python,comp.lang.lisp,sci.lang Subject: Re: How do i get multiple Min() values? Date: Fri, 12 Jul 2024 12:00:22 -0700 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 12 Jul 2024 21:00:24 +0200 (CEST) Injection-Info: dont-email.me; posting-host="13ab68f9fb6c4be36bb820e4a5191e48"; logging-data="3322076"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199/BWlMyufpfhwumHRVOLDNF0YYcd6l54=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1://H6UF1oRpERuBOKx5Itcx6QfOo= Content-Language: en-US In-Reply-To: Bytes: 1630 > > How do i get multiple Min() values? > >           e.g.      for   Y = (x-2)*(x-3)   for x in range(-10,10) >                                    the min Y is hit twice > > > print(  min( ((x-2)*(x-3),  (x, (x-2, x-3))) >                                            for x in range(-10,10) ) ) > > > > is this easy in Scheme(Gauche) ? if the Min() is going to check all of the Candidate values, it could (at least) tell us how many times the Min value was seen!