Deutsch   English   Français   Italiano  
<v6mcog$1vuc4$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "B. Pym" <NoSpam_762@not_there.org>
Newsgroups: comp.lang.lisp,comp.lang.misc,sci.lang
Subject: Re: (in Python) given a list of candidates [ (12, "Dat"), (5, "dat"), (4,"..."), ...] find the Tuple with the Min (1st) tag value
Date: Wed, 10 Jul 2024 16:26:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <v6mcog$1vuc4$1@dont-email.me>
References: <v6lho7$1rc9n$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Date: Wed, 10 Jul 2024 18:26:59 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6f6282e3be4159d4eef0e2cf40c4caf3";
	logging-data="2095492"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19YlFBvUyMwKLyf9Oj7BsI2"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:Uo1b4Ns0YIlVT3nqY8u7ZEOnROI=
Bytes: 1510

HenHanna wrote:

> 
> (in Python)  let's say i have a list of candidates
> like this
>            a= [ (12, "Data1"),  (5, "data"),  (4, "..."), ...]
> 
> and i want to find the Tuple with the Min (1st) tag value.
> 
> in Python that's what   min()   gives, by default.
> 
>                  min(a)
> 
> 
> Is this the same in Scheme(Gauche) ?


(use gauche.collection) ;;  find-min

(find-min
  '[(12 "Data1") (5 "data") (4 "...")]
  :key car)

  ===>
(4 "...")