test/relative-chained-mac-mod-mac/mac-head.fnl
raw| 1 | ;; relatively require a *module* for functionality in processing macro args |
| 2 | (local relrequire ((fn [ddd] |
| 3 | (fn [modname] |
| 4 | (let [prefix (or (string.match ddd "(.+%.)mac%-head") "")] |
| 5 | (require (.. prefix modname))))) ...)) |
| 6 | |
| 7 | (local {: bkwd} (relrequire :mod-mid)) |
| 8 | |
| 9 | (fn rsym [...] |
| 10 | "generates a list of strings from a given list of symbols, in reverse" |
| 11 | (let [syms [...] |
| 12 | rsyms (icollect [v (bkwd syms)] (tostring v))] |
| 13 | rsyms)) |
| 14 | |
| 15 | {: rsym} |
| 16 |