From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Allow nfs file systems to be automatically mounted. Date: Mon, 28 Nov 2016 22:05:15 +0100 Message-ID: <87lgw3l3hw.fsf@gnu.org> References: <8760nc6et6.fsf@gnu.org> <1480152990-7080-1-git-send-email-jmd@gnu.org> <87fumenl44.fsf@gnu.org> <20161126193358.GA10000@jocasta.intra> <87polfbt8y.fsf@gnu.org> <20161128140754.GA7013@jocasta.intra> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBT73-0005MT-Gp for guix-devel@gnu.org; Mon, 28 Nov 2016 16:05:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBT70-0004sB-DB for guix-devel@gnu.org; Mon, 28 Nov 2016 16:05:21 -0500 In-Reply-To: <20161128140754.GA7013@jocasta.intra> (John Darrington's message of "Mon, 28 Nov 2016 15:07:54 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: John Darrington Cc: guix-devel@gnu.org, John Darrington John Darrington skribis: > On Mon, Nov 28, 2016 at 02:59:09PM +0100, Ludovic Court??s wrote: > > ???match???,=20 > > > > Have another look: + (let* ((host (match (string-split source #= \:) ((h _) h))) >=20=20=20=20=20=20 > Right, but there are other occurrences of ???car??? for ???getaddrin= fo???. :-) > > But that occurance applies to a real list, rather than a list used as rec= ord. > In other words, I really do just want to get the first item of that list. > As I understand it, match is supposed to be used for heterogenous lists w= here > each member has its own semantics. That is not the case here. =E2=80=98match=E2=80=99 can be used to match anything, and I highly recomme= nd using it for lists (info "(guile) Pairs"): it generates clearer and foolproof code. In this case =E2=80=98getaddrinfo=E2=80=99 might well return an empty list. Ludo=E2=80=99.