From 95125d682cb70efbbbd41646b8ebe1f0518fa1f5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 1 Mar 2014 20:30:08 +0100 Subject: Simplify list-repository-locations Simplify `list-repository-location' by extracting the lambda's used and defining them as separate procedures. --- gitto/git.scm | 5 +++++ gitto/main.scm | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gitto/git.scm b/gitto/git.scm index be91042..a0cec3a 100644 --- a/gitto/git.scm +++ b/gitto/git.scm @@ -37,6 +37,7 @@ repo-location repo-name repository? + repository)) +(define (repository)) (force (slot-ref branch 'pullable))) 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