diff options
author | Arun Isaac | 2024-09-05 17:10:40 +0100 |
---|---|---|
committer | Arun Isaac | 2024-09-05 17:10:40 +0100 |
commit | 5879062693271a98b185aca40120a21c35581f51 (patch) | |
tree | 0b49a46567590de0a99125bbba6a74ce2913a40f | |
parent | bea4cf1ae71bb20f436d16041d642dc56faea734 (diff) | |
download | ravanan-5879062693271a98b185aca40120a21c35581f51.tar.gz ravanan-5879062693271a98b185aca40120a21c35581f51.tar.lz ravanan-5879062693271a98b185aca40120a21c35581f51.zip |
command-line-tool: Remove mutual recursion in collect-bindings.
*
ravanan/command-line-tool.scm (build-command)[input+type-tree+binding->command-line-binding]:
Remove mutual recursion with collect-bindings.
-rw-r--r-- | ravanan/command-line-tool.scm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index 30ff451..8f269ff 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -250,13 +250,13 @@ G-expressions are inserted." position prefix matched-type - (collect-bindings - (list (vector->list input) - (make-list (vector-length input) - (assoc-ref type-tree "items")) - (make-list (vector-length input) - (maybe-assoc-ref (just type-tree) - "inputBinding")))) + (append-map (lambda (input) + (input+type-tree+binding->command-line-binding + (list input + (assoc-ref type-tree "items") + (maybe-assoc-ref (just type-tree) + "inputBinding")))) + (vector->list input)) (maybe-assoc-ref binding "itemSeparator")))) (else (list (command-line-binding |