[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58660] [PATCH v2 1/3] etc: teams: Add 'show' subcommand.
From: |
Mathieu Othacehe |
Subject: |
[bug#58660] [PATCH v2 1/3] etc: teams: Add 'show' subcommand. |
Date: |
Fri, 18 Nov 2022 18:29:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hello,
> "Print all teams, their scope and their members."
> (define port* (current-output-port))
> (define width* (%text-width))
> @@ -564,11 +565,13 @@ (define width* (%text-width))
> (scope (format #f "scope: ~{~s ~}~%" scope))))
> (list-members team port* "+ ")
> (newline))
This procedure is starting to get a little complex. We could put the
above is a sub-procedure called "print-team".
> + (sort
> + (hash-map->list (lambda (key value) value) %teams)
> + (lambda (team1 team2)
> + (string<? (symbol->string (team-id team1))
> + (symbol->string (team-id team2))))))))
That could be in a variable called %sorted-teams.
Thanks,
Mathieu