summaryrefslogtreecommitdiffstats
path: root/2024/tcl/lib.tcl
diff options
context:
space:
mode:
authorAleteoryx <alyx@aleteoryx.me>2024-12-04 00:43:56 -0500
committerAleteoryx <alyx@aleteoryx.me>2024-12-04 00:44:04 -0500
commitfbf1ad5d946eceb3fd75cf9ddfb977623019d549 (patch)
tree890d517994fd5bb04821a4f639007d064c60eec1 /2024/tcl/lib.tcl
parent645bf066b803f6a5b62aba177f792269b92e5377 (diff)
downloadadventofcode-fbf1ad5d946eceb3fd75cf9ddfb977623019d549.tar.gz
adventofcode-fbf1ad5d946eceb3fd75cf9ddfb977623019d549.tar.bz2
adventofcode-fbf1ad5d946eceb3fd75cf9ddfb977623019d549.zip
2024.4 try 1, unfinished
Diffstat (limited to '2024/tcl/lib.tcl')
-rw-r--r--2024/tcl/lib.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/2024/tcl/lib.tcl b/2024/tcl/lib.tcl
index 698bb9a..2968072 100644
--- a/2024/tcl/lib.tcl
+++ b/2024/tcl/lib.tcl
@@ -39,3 +39,11 @@ proc regroup {pat {var input}} {
lappend list2 $cur
set list $list2
}
+
+proc sindex {str args} {
+ set ret {}
+ foreach arg $args {
+ append ret [string index $str $arg]
+ }
+ return $ret
+}