This file contains 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
# Author: Eduardo Emery | |
# | |
# The function `thread_functions` below implements in Python a Clojure macro | |
# called "Threading", also known as "Arrow Macro". As explained in the guide, | |
# the macro "convert nested function calls into a linear flow of function | |
# calls, improving readability" (https://clojure.org/guides/threading_macros). | |
# | |
# The goal of `thread_functions` is to sequentially execute functions from a | |
# starting point, to improve readability. It receives an initial set of | |
# parameters and a set of functions. The initial parameters are applied to |