Subject: [bug#58660] [PATCH v2 1/3] etc: teams: Add 'show' subcommand.

From: Mathieu Othacehe <[email-masked]>
Date: Fri, 18 Nov 2022 18:29:50 +0100

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