greetings gEDA hackers,

please find below a small patch to

  geda/devel/gnetlist/scheme/gnet-PCB.scm

in the factoring spirit (i.e., using available abstractions).  i
hope it is tiny and meritous enough to be applied w/o paperwork.
it can be made even tinier by moving the `use-modules' to some
central place.

thi

_____________________________
--- gnet-PCB.scm        3 Feb 2005 12:49:36 -0000       1.7
+++ gnet-PCB.scm        3 Mar 2006 23:57:53 -0000
@@ -22,10 +22,6 @@
 
+(use-modules (ice-9 format))
+
 (define (PCB:display-connections nets)
-  (let ((k ""))
-    (for-each (lambda (in-string)
-                (set! k (string-append k in-string)))
-              (map (lambda (net)
-                     (string-append (car net) "-" (car (cdr net)) " "))
-                   nets))
-    (string-append k "\n")))
+  (apply format #f "~:@{~A-~A ~}\n" nets))
 

Reply via email to