emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pspp-mode f087280: * pspp-mode.el: Simplify pspp--updow


From: Mattias Engdegård
Subject: [elpa] externals/pspp-mode f087280: * pspp-mode.el: Simplify pspp--updown-list
Date: Mon, 6 Jul 2020 04:46:19 -0400 (EDT)

branch: externals/pspp-mode
commit f0872801dab7b5bedb1fe71252ebc59864a87e8c
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    * pspp-mode.el: Simplify pspp--updown-list
    
    (pspp--updown-list): Use mapcar instead of recursion.
    (pspp--downcase-list, pspp--upcase-list): Remove.
---
 pspp-mode.el | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/pspp-mode.el b/pspp-mode.el
index 401d517..74ff594 100644
--- a/pspp-mode.el
+++ b/pspp-mode.el
@@ -60,24 +60,10 @@
   "Size of indent.")
 
 
-(defun pspp--downcase-list (l)
-  "Takes a list of strings and returns that list with all elements downcased"
-  (if l
-      (cons (downcase (car l)) (pspp--downcase-list (cdr l)))
-    nil))
-
-
-(defun pspp--upcase-list (l)
-  "Takes a list of strings and returns that list with all elements upcased"
-  (if l
-      (cons (upcase (car l)) (pspp--upcase-list (cdr l)))
-    nil))
-
-
 (defun pspp--updown-list (l)
   "Takes a list of strings and returns that list with all elements upcased
 and downcased"
-  (append (pspp--upcase-list l) (pspp--downcase-list l)))
+  (append (mapcar #'upcase l) (mapcar #'downcase l)))
 
 
 (defconst pspp-indenters



reply via email to

[Prev in Thread] Current Thread [Next in Thread]