From 0097800eba450326b8dc7ab76eb3db72031684db Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Tue, 16 Jul 2019 19:36:58 +0200 Subject: [PATCH] cleaned code --- phonetics-feature-tree.scm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/phonetics-feature-tree.scm b/phonetics-feature-tree.scm index 0926a87..58cb2a6 100644 --- a/phonetics-feature-tree.scm +++ b/phonetics-feature-tree.scm @@ -1,17 +1,12 @@ (define (declare-node node-text node-generation) - (string-append ;; "node" - (number->string node-generation) + (string-append (number->string node-generation) "[label=\"" node-text - "\"];\n")) + "\"];")) (define (make-link previous-node current-node) - (string-append ;; "node" - (number->string previous-node) - " -- " - ;; "node" - (number->string current-node) - ";\n")) + (string-append (number->string previous-node) " -- " + (number->string current-node) ";")) (define (tree-to-dot-helper tree current-generation previous-generation) ;; Helper to ~tree-to-dot~ that translates a Scheme tree with any number of @@ -42,7 +37,7 @@ ;; Returns a graphviz’s dot-compatible string representing a Scheme tree (if (null? tree) "" (string-append - "graph{node[shape=plaintext];graph[bgcolor=\"transparent\"];\n" + "graph{node[shape=plaintext];graph[bgcolor=\"transparent\"];" (declare-node (car tree) 0) (tree-to-dot-helper (cdr tree) 1 0) "}")))