createEntries

This commit is contained in:
2021-06-27 22:25:05 -06:00
parent c9ed27f6e9
commit 7fef6b9533
2 changed files with 7 additions and 2 deletions

View File

@@ -64,6 +64,7 @@ class Kiss {
"expList" => Symbol("Prelude.expList"),
"map" => Symbol("Lambda.map"),
"filter" => Symbol("Lambda.filter"), // TODO use truthy as the default filter function
"flatten" => Symbol("Lambda.flatten"),
"has" => Symbol("Lambda.has"),
"count" => Symbol("Lambda.count")
],

View File

@@ -146,6 +146,10 @@
(defcommand printSelectedEntries [entries (SelectedEntries null null)]
(doFor e entries (ui.displayMessage (archive.fullString e))) [])
(defcommand createEntry [name (Text null null)]
(defcommand createEntry [name (Text null)]
[(archive.createEntry ->e
(addComponent archive e Name name))]))
(addComponent archive e Name name))])
(defcommand createEntries [names (VarText null)]
(flatten (for name names
(createEntry name)))))