From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: CL package serious deficiencies Date: Sat, 11 Feb 2012 14:25:00 +0100 Message-ID: References: <33271707.post@talk.nabble.com> <87fwemcwlx.fsf@spindle.srvr.nix> <87d39pgdu4.fsf@gnus.org> <87mx8qy09w.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328966750 8578 80.91.229.3 (11 Feb 2012 13:25:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2012 13:25:50 +0000 (UTC) Cc: Helmut Eller , Stefan Monnier , emacs-devel@gnu.org To: Teemu Likonen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 14:25:47 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwCxW-0006Yn-LM for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2012 14:25:46 +0100 Original-Received: from localhost ([::1]:44819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwCxV-0001jL-GU for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2012 08:25:45 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwCxT-0001jG-5R for emacs-devel@gnu.org; Sat, 11 Feb 2012 08:25:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwCxR-0000EI-S9 for emacs-devel@gnu.org; Sat, 11 Feb 2012 08:25:43 -0500 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:60606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwCxR-0000EC-NO for emacs-devel@gnu.org; Sat, 11 Feb 2012 08:25:41 -0500 Original-Received: by dadv6 with SMTP id v6so3311168dad.0 for ; Sat, 11 Feb 2012 05:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=xAWPXQXf5RR3M5E2MtRMwj5Rc8WEhnT7X/9tylTS2mY=; b=L27QLeiLHTCjaISGMUCe+wIyAMnrSWfAEd+qUCt7cQ+JS6wx1xCnsn3g0zj6jFE0Wy IaMNqGaqyffyHWOjqzGDEaMPexM5Ip9EzqkdDH7EvbSTXt+uNVwvysytP1M3iAodA8wZ GQ01m0ewZayfHaBGNgVeOgCN6heJcEfxWcVEI= Original-Received: by 10.68.231.201 with SMTP id ti9mr27357512pbc.73.1328966740303; Sat, 11 Feb 2012 05:25:40 -0800 (PST) Original-Received: by 10.143.37.9 with HTTP; Sat, 11 Feb 2012 05:25:00 -0800 (PST) In-Reply-To: <87mx8qy09w.fsf@mithlond.arda> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 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:148470 Archived-At: On Fri, Feb 10, 2012 at 20:08, Teemu Likonen wrote: > Here's one example: > > =C2=A0 =C2=A0(defun delete-nth (n sequence) > =C2=A0 =C2=A0 =C2=A0(delete-if (constantly t) sequence :start n :count 1)= ) BTW, (defun delete-last-nth (n sequence) (delete-if (lambda (_) (minusp (decf n))) sequence :from-end t :count 1= )) should work, and it does in SBCL * (defun delete-last-nth (n sequence) (delete-if (lambda (_) (minusp (decf n))) sequence :from-end t :count 1)) ; in: DEFUN DELETE-LAST-NTH ; (LAMBDA (_) (MINUSP (DECF N))) ; =3D=3D> ; #'(LAMBDA (_) (MINUSP (DECF N))) ; ; caught STYLE-WARNING: ; The variable _ is defined but never used. ; ; compilation unit finished ; caught 1 STYLE-WARNING condition DELETE-LAST-NTH * (delete-last-nth 0 '(a b c)) (A B) * (delete-last-nth 1 '(a b c)) (A C) * (delete-last-nth 2 '(a b c)) (B C) but not in elisp: ELISP> (delete-nth-from-end 0 '(a b c)) (a b) ELISP> (delete-nth-from-end 1 '(a b c)) (a b) ELISP> (delete-nth-from-end 2 '(a b c)) (a b) That is a bug, I gather. =C2=A0 =C2=A0 Juanma