This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Transparent Functions | |
| ;; I was experimenting with transducers and wanted a way to understand how they worked. Transducer | |
| ;; code uses many nested functions in various locations with other nested functions defined as local | |
| ;; variables in scope. Typically after an anonymous Clojure function is defined you have no visibility | |
| ;; into the locals that were in scope when the function was defined, where the function came from, | |
| ;; or the code in the function. I defined a macro, tfn, that creates a transparent function. It's | |
| ;; a normal Clojure function with additional metadata including the function code and local | |
| ;; variable names and values. |