diff options
| author | jgart <jgart@dismail.de> | 2026-02-12 12:06:02 -0500 |
|---|---|---|
| committer | jgart <jgart@dismail.de> | 2026-02-15 14:12:30 -0500 |
| commit | 1337ab25adc3a5e89c61108bf11e86e71e47c861 (patch) | |
| tree | 50b2d72199756e83c5fc19957aa25342db42a1d8 /gnu | |
| parent | d1a2185fff3f2546712c89b002ed76cd8389dadc (diff) | |
home: services: sway: Refactor flatmap to append-map.
* gnu/home/services/sway.scm (flatmap): Refactor flatmap to append-map.
Change-Id: I1a8e46ac7f2de163bc33f4bf61f267d35893cfc2
Signed-off-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/home/services/sway.scm | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/gnu/home/services/sway.scm b/gnu/home/services/sway.scm index e9a488f1caa..a2d13e77202 100644 --- a/gnu/home/services/sway.scm +++ b/gnu/home/services/sway.scm @@ -102,18 +102,6 @@ ;; Convenient value to inherit for extensions. %empty-sway-configuration)) -;; Helper function. -(define (flatmap f l) - (let loop ((lst (reverse l)) - (acc '())) - (match lst - (() acc) - ((head . tail) - (let* ((h (f head)) - (acc (append h acc))) - (loop tail acc)))))) - - ;;; ;;; Definition of configurations. ;;; @@ -894,13 +882,13 @@ ;; Outputs. #$@(with-heading "Outputs." - (flatmap serialize-output - (sway-configuration-outputs conf))) + (append-map serialize-output + (sway-configuration-outputs conf))) ;; Inputs. #$@(with-heading "Inputs." - (flatmap serialize-input - (sway-configuration-inputs conf))) + (append-map serialize-input + (sway-configuration-inputs conf))) ;; Bar configuration: ;; If the bar is unset, do not include anything. @@ -920,8 +908,8 @@ ;; Modes. #$@(with-heading "Modes." - (flatmap serialize-mode - (sway-configuration-modes conf))) + (append-map serialize-mode + (sway-configuration-modes conf))) ;; Startup-Programs. #$@(with-heading |
