[logaling-commit] logaling/logalimacs [master] Use the for statement instead of local variable of let*

Back to archive index

null+****@clear***** null+****@clear*****
Thu Jun 7 22:31:57 JST 2012


yuta yamada	2012-06-07 22:31:57 +0900 (Thu, 07 Jun 2012)

  New Revision: 86d5f1cf9daeb65125af646aac464f2bf05391d7

  Log:
    Use the for statement instead of local variable of let*

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+4 -5)
===================================================================
--- logalimacs.el    2012-06-07 22:19:05 +0900 (c1301f4)
+++ logalimacs.el    2012-06-07 22:31:57 +0900 (854fe18)
@@ -283,11 +283,10 @@
 
 (defun loga-compute-max-length (words)
   (let* ((max-source-length 0)
-         (max-target-length 0)
-         source-length target-length)
-    (loop for (source target) in words do
-          (setq source-length (loga-compute-length source)
-                target-length (loga-compute-length target))
+         (max-target-length 0))
+    (loop for (source target) in words
+          for source-length = (loga-compute-length source)
+          for target-length = (loga-compute-length target)
           if (and (or (< max-source-length source-length)
                       (< max-target-length target-length))
                   (< source-length loga-width-limit-source)




More information about the logaling-commit mailing list
Back to archive index