[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
141/197: gurses: Avoid one usage of car and cdr.
From: |
Danny Milosavljevic |
Subject: |
141/197: gurses: Avoid one usage of car and cdr. |
Date: |
Mon, 3 Jul 2017 20:37:15 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 899995c62e9401c987545452391a26ffe583e24b
Author: John Darrington <address@hidden>
Date: Fri Jan 27 08:41:38 2017 +0100
gurses: Avoid one usage of car and cdr.
* gurses/stexi.scm (offset-to-end-of-word): Replace car and cdr with match.
---
gurses/stexi.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gurses/stexi.scm b/gurses/stexi.scm
index 67ffd4e..b49ff4d 100644
--- a/gurses/stexi.scm
+++ b/gurses/stexi.scm
@@ -105,13 +105,13 @@ described by the stexi STXI"
"Return the number of xchars until the end of the current word."
(define (offset-to-end-of-word' cs dist)
- (cond
- ((zero? (length cs))
- dist)
- ((char-set-contains? char-set:blank (car (xchar-chars (car cs))))
- dist)
- (else
- (offset-to-end-of-word' (cdr cs) (1+ dist)))))
+ (match
+ cs
+ ('() dist)
+ (((? xchar? first) . rest)
+ (if (char-set-contains? char-set:blank (car (xchar-chars first)))
+ dist
+ (offset-to-end-of-word' rest (1+ dist))))))
(offset-to-end-of-word' ccs 0))
- 119/197: gurses: Allow menu update to work for panel windows., (continued)
- 119/197: gurses: Allow menu update to work for panel windows., Danny Milosavljevic, 2017/07/03
- 103/197: installer: Avoid exception when the device to format cannot be found., Danny Milosavljevic, 2017/07/03
- 116/197: installer: Fix bug in config generation., Danny Milosavljevic, 2017/07/03
- 105/197: installer: Extend the 'file-system' concept to include swap spaces., Danny Milosavljevic, 2017/07/03
- 83/197: installer: "Setup" --> "Set up", Danny Milosavljevic, 2017/07/03
- 92/197: installer: Remove mkfs capability from mount points page., Danny Milosavljevic, 2017/07/03
- 118/197: installer: Distinguish between Wifi encryption methods., Danny Milosavljevic, 2017/07/03
- 127/197: gurses: Remove box from form popup window., Danny Milosavljevic, 2017/07/03
- 123/197: installer: Add a popup window for forms which have multiple choice fields., Danny Milosavljevic, 2017/07/03
- 121/197: installer: Note which types of file system are supported., Danny Milosavljevic, 2017/07/03
- 141/197: gurses: Avoid one usage of car and cdr.,
Danny Milosavljevic <=
- 151/197: installer: Avoid wpa_supplicant's output causing screen damage., Danny Milosavljevic, 2017/07/03
- 99/197: installer: Exit the format page after all partitions are successfully formatted., Danny Milosavljevic, 2017/07/03
- 101/197: installer: Replace one usage of car with match., Danny Milosavljevic, 2017/07/03
- 109/197: installer: Fix bug where the selected item of main page was not indicated., Danny Milosavljevic, 2017/07/03
- 104/197: installer: Support btrfs, Danny Milosavljevic, 2017/07/03
- 111/197: gurses: Change highlighting from bold to inverse., Danny Milosavljevic, 2017/07/03
- 108/197: installer: Do not add file systems which are invalid., Danny Milosavljevic, 2017/07/03
- 164/197: gurses: Use match instead of car., Danny Milosavljevic, 2017/07/03
- 170/197: installer: Remove unused procedure., Danny Milosavljevic, 2017/07/03
- 152/197: installer: New file i18n.scm., Danny Milosavljevic, 2017/07/03