summaryrefslogtreecommitdiffstats
path: root/2024/tcl/lib.tcl
diff options
context:
space:
mode:
authorAleteoryx <alyx@aleteoryx.me>2024-12-04 01:21:14 -0500
committerAleteoryx <alyx@aleteoryx.me>2024-12-04 01:21:14 -0500
commitc33cfb0574449f074920632e9a9ff6cb78327e76 (patch)
treebd9bd0ce7e3dc471c741594e84c2dcb1f18e59d8 /2024/tcl/lib.tcl
parentfbf1ad5d946eceb3fd75cf9ddfb977623019d549 (diff)
downloadadventofcode-c33cfb0574449f074920632e9a9ff6cb78327e76.tar.gz
adventofcode-c33cfb0574449f074920632e9a9ff6cb78327e76.tar.bz2
adventofcode-c33cfb0574449f074920632e9a9ff6cb78327e76.zip
2024.4, sigh
Diffstat (limited to '2024/tcl/lib.tcl')
-rw-r--r--2024/tcl/lib.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/2024/tcl/lib.tcl b/2024/tcl/lib.tcl
index 2968072..048bce5 100644
--- a/2024/tcl/lib.tcl
+++ b/2024/tcl/lib.tcl
@@ -47,3 +47,10 @@ proc sindex {str args} {
}
return $ret
}
+proc lrindex {list args} {
+ set ret {}
+ foreach arg $args {
+ lappend ret [lindex $list {*}$arg]
+ }
+ return $ret
+}