diff options
author | Tom Willemse | 2014-03-01 20:30:08 +0100 |
---|---|---|
committer | Tom Willemse | 2014-03-01 20:30:08 +0100 |
commit | 95125d682cb70efbbbd41646b8ebe1f0518fa1f5 (patch) | |
tree | 600c61d03fb7b3413f6ba69a91930f2759f645fc /gitto/main.scm | |
parent | ea945c83faa9e067799cbae248d910d41b65c092 (diff) | |
download | gitto-95125d682cb70efbbbd41646b8ebe1f0518fa1f5.tar.gz gitto-95125d682cb70efbbbd41646b8ebe1f0518fa1f5.zip |
Simplify list-repository-locations
Simplify `list-repository-location' by extracting the lambda's used and
defining them as separate procedures.
Diffstat (limited to 'gitto/main.scm')
-rw-r--r-- | gitto/main.scm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gitto/main.scm b/gitto/main.scm index 0bd30a9..f8eeb18 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -43,13 +43,12 @@ (define (list-repository-locations) "List the registered locations of repositories." - (for-each - (lambda (repo) - (display (repo-location repo)) - (newline)) - (sort repositories - (lambda (s1 s2) - (string<? (repo-location s1) (repo-location s2)))))) + (for-each print-repository-location (sort repositories repository<?))) + +(define (print-repository-location repo) + "Print the location of REPO." + (display (repo-location repo)) + (newline)) (define (registered? repo) "Check if REPO has been registered." |