Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
val .select = f(.entries) {
if not isArray(.entries): throw "invalid args"
if len(.entries) == 0: return ""
# print the menu
writeln join "\n", map(f $"\.i:2;: \.e;", .entries, 1..len .entries)
val .idx = toNumber read(
"Select entry #: ",
f(.x) {
if not matching(RE/^[0-9]+$/, .x): return false
val .y = toNumber .x
.y > 0 and .y <= len(.entries)
},
"invalid selection\n", -1,
)
.entries[.idx]
}
writeln .select(["fee fie", "eat pi", "huff and puff", "tick tock"])