From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Aaron Ecay Newsgroups: gmane.emacs.devel Subject: Re: New jrpc.el JSONRPC library Date: Mon, 21 May 2018 15:37:04 +0100 Message-ID: <877enx5b3j.fsf@gmail.com> References: <87lgcrqgvz.fsf@gmail.com> <831seipvdb.fsf@gnu.org> <871se9lyid.fsf_-_@gmail.com> <87d0xqs56o.fsf@gmail.com> <87d0xp5e5o.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1526913330 28198 195.159.176.226 (21 May 2018 14:35:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 May 2018 14:35:30 +0000 (UTC) User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 16:35:26 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fKluH-0007EP-T0 for ged-emacs-devel@m.gmane.org; Mon, 21 May 2018 16:35:26 +0200 Original-Received: from localhost ([::1]:50996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKlwP-0001B8-0G for ged-emacs-devel@m.gmane.org; Mon, 21 May 2018 10:37:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKlw0-00010b-A1 for emacs-devel@gnu.org; Mon, 21 May 2018 10:37:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fKlvv-0000xk-E9 for emacs-devel@gnu.org; Mon, 21 May 2018 10:37:12 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:52722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fKlvv-0000wy-7v for emacs-devel@gnu.org; Mon, 21 May 2018 10:37:07 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id w194-v6so25609715wmf.2 for ; Mon, 21 May 2018 07:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=Vc6m45AhYbHQzU+HqDCM+/NhVCn6OvMykio7bSWQDp8=; b=ltEYMpUn/bTt9S5GkC0E70sgp8uDrP8yF8Or9z1yyjnYzdcsng80hEwyC9ID2pB1Pn 6Ybtb/c+z395AYICma+aNDhGWQL0MLIurqnqg/VQN1WSOHrKLYXPwXowsPlWJjZIMWhK +/xo1ZjrCzqGxakuCKO/KO1q92NKklkd1xbVEdlhPwWl4+GwBJahoCvgMmCXHfJQa93i gvQLyUcQz2ng9T2jSk3tDFXUbONV4rz0CzDk8X4DbZqhq+b1j6IdlR5xbu8vfoIiVF4V IqiPQ7mFDi+rvZhA69CnVnLtfoEqvL/1/dYqE/zQ4vvJ758YJgBHZ8Q/Tp+a1xueAHKC rOcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=Vc6m45AhYbHQzU+HqDCM+/NhVCn6OvMykio7bSWQDp8=; b=KOeMfDn5CoeZcUwV7HxXDwMyh+Hw48gGl7k0APpqOVIeqemerIAOddqpsbQLP52MMx C27slWkl4XPtlI7EhA00orbVxdR7LSFpBwUs/Dpetl6sap8NHIZv604llLqrQljMAicN Fw6jqYx24RVe/HHR5IosEGXbekpWEHoYr7UCS37U1DqF/zLH3n21VaRnfmgfCYqQRKN2 TFFOGkF5C7+Kl7ppmJnIp51Uuwz8gDD346RJD/WB8X1QYodjJieiNXQmmoaIp4PbEJDH /DJfN20Ld13phgQsJM9sZW3mc/tivUufCwBSziAROIWFTJ9JFOYdpLnLUfCOC/9n2rsi 11Bw== X-Gm-Message-State: ALKqPweOwtfpv/6kn40/81J9L5W5J8qJC42zL13md1n4HXKh88kQbIrj lwsZYWKM8wHtQNcSfAtWOojTCSba X-Google-Smtp-Source: AB8JxZq8o7xLt69Zi3AOxt/ThYArPs5aSGiZDe1a98jYp1RQuWs2GcpvwmaLU87RFKun3nsJQ3q0zg== X-Received: by 2002:a1c:9186:: with SMTP id t128-v6mr11808567wmd.41.1526913426136; Mon, 21 May 2018 07:37:06 -0700 (PDT) Original-Received: from localhost (host-78-145-166-130.as13285.net. [78.145.166.130]) by smtp.gmail.com with ESMTPSA id n17-v6sm7458631wra.3.2018.05.21.07.37.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 May 2018 07:37:05 -0700 (PDT) In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225513 Archived-At: Hi Jo=C3=A3o, 2018ko maiatzak 21an, Jo=C3=A3o T=C3=A1vora-ek idatzi zuen: >=20 > Hi Aaron, >=20 > Nice, i didn't know about that. Does it have an equivalent to > &allow-other-keys and &rest? &allow-other-keys is always true for the pcase version. As I understand what &rest does, it lets you bind certain keys, and then bind the map minus those keys to another variable. There=CA=BCs nothing like that out of the box, but it can easily be implemented: (pcase-defmacro map-and-rest (rest-var &rest keys) `(and (map ,@keys) (app (map-filter (lambda (key _val) (not (memq key ',keys)))) ,rest= -var))) (pcase-let* (((map-and-rest rest foo bar) '((foo . 1) (bar . 2) (baz . 3)))) (list foo bar rest)) ;; -> (1 2 ((baz . 3))) --=20 Aaron Ecay