Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,24 @@
(import std.List)
(let gen_string (fun (length) {
(mut output "")
(while (< (len output) length) {
(set output (+ output (@ "[]" (random 0 1)))) })
output }))
(let balanced? (fun (str) {
(mut i 0)
(=
(len str)
(len
(list:takeWhile str (fun (char) {
(if (= "[" char)
(set i (+ i 1))
(set i (- i 1)))
(>= i 0) }))))}))
(list:forEach
(list:iota 0 5)
(fun (_) {
(let str (gen_string (random 2 8)))
(print (string:format "{:<8}: {:^6}" str (if (balanced? str) "OK" "NOT OK"))) }))