From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Semantic of pcase `seq' and `map' patterns Date: Mon, 12 Oct 2015 15:41:20 +0200 Message-ID: <87si5gw6f3.fsf@web.de> References: <87wpyaet7r.fsf@web.de> <87y4iqh7x0.fsf@web.de> <87oajmld49.fsf@gnu.org> <87oajlyif9.fsf@gnu.org> <87a8v53wll.fsf@web.de> <87k2qsxr73.fsf_-_@web.de> <87bnc4mh2q.fsf@petton.fr> <874mhwxne8.fsf_-_@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444657342 20513 80.91.229.3 (12 Oct 2015 13:42:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 13:42:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 12 15:42:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZldMi-0005iM-BY for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 15:42:12 +0200 Original-Received: from localhost ([::1]:55422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZldMh-0006t0-PV for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 09:42:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZldMC-0006rH-3y for emacs-devel@gnu.org; Mon, 12 Oct 2015 09:41:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZldM6-0001QO-HA for emacs-devel@gnu.org; Mon, 12 Oct 2015 09:41:40 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:53356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZldM6-0001Q2-AC for emacs-devel@gnu.org; Mon, 12 Oct 2015 09:41:34 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZldLy-00055Q-OR for emacs-devel@gnu.org; Mon, 12 Oct 2015 15:41:26 +0200 Original-Received: from ip-90-186-2-115.web.vodafone.de ([90.186.2.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 15:41:26 +0200 Original-Received: from michael_heerdegen by ip-90-186-2-115.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 15:41:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-186-2-115.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:OfrAECbnQt3RcQy7kVaPfZ/BZMc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191333 Archived-At: Michael Heerdegen writes: > -- (seq &rest PATTERNS) > > pcase pattern matching sequence elements. > Matches if the object is a sequence (list, string or vector), and > each PATTERN matches the corresponding element of the > sequence. It should probably also say that supernumerary elements of the object sequence are ignored if less PATTERNS are given, and the match doesn't fail. BTW, if I want to match [1 2 3 4] and bind a to 1 and b to (2 3 4), is this possible using the `seq' pattern? Michael.