Re: Passing a list of unevaluated partial functions

2014-11-25 Thread Isaac Karth
String.format could work; I would prefer to have an inline syntax for the string formatting rather than appending it at the end, but that's the major objection. The main goal was to have the strings be easy to write and to make it easy to have variations. I'm also trying to avoid eval-ing a stri

Re: Passing a list of unevaluated partial functions

2014-11-25 Thread Gary Verhaegen
Can you elaborate on what makes String.format not a good fit here? On Tuesday, 25 November 2014, James Reeves wrote: > Do you know about closures? So something like: > > (defn foo [arg1 arg2] > (fn [state] (do-something-with state arg1 arg2))) > > - James > > On 25 November 2014 at 18:55, Isaa

Re: Passing a list of unevaluated partial functions

2014-11-25 Thread James Reeves
Do you know about closures? So something like: (defn foo [arg1 arg2] (fn [state] (do-something-with state arg1 arg2))) - James On 25 November 2014 at 18:55, Isaac Karth wrote: > I'm trying to build a string output system with functions that later have > a state passed to it, so that I can wr

Passing a list of unevaluated partial functions

2014-11-25 Thread Isaac Karth
I'm trying to build a string output system with functions that later have a state passed to it, so that I can write something like (output "The result of this example is: " (get :result)) and have it passed to a parsing function that takes a state and calls the functions in the list, something