From 804f2a342d1b2002ad383ff604e75eb0caba8f65 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 13 Nov 2024 06:17:23 -0600 Subject: ton of new stuff --- fnl/util.fnl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 fnl/util.fnl (limited to 'fnl/util.fnl') diff --git a/fnl/util.fnl b/fnl/util.fnl new file mode 100644 index 0000000..12abe74 --- /dev/null +++ b/fnl/util.fnl @@ -0,0 +1,12 @@ +(local M {}) +(tset _G :loaded {}) + +(tset M :require! (lambda [name] + (tset _G.loaded name (require name)) + (. _G.loaded name))) + +(tset M :setup! (lambda [name ?config] + ;(tset _G.loaded :name ((. (require name) :setup) (or ?config {}))))) + ((. (M.require! name) :setup) (or ?config {})))) + +M -- cgit v1.2.3