Re: Passing a list of unevaluated partial functions

2014-11-25 Thread Isaac Karth
o 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

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

Re: Deterministic Randomness in Functional Clojure

2014-10-31 Thread Isaac Karth
Thanks for all of the feedback so far, it's been helpful. Mars0i, keeping an RNG for each thing that needs to have an independent random state seems like a good idea for a fallback, and the suggestion of using a different RNG is a good one. It's also helpful to know other people have dealt with

Re: Deterministic Randomness in Functional Clojure

2014-10-30 Thread Isaac Karth
uses. > > I apologise for not providing any concrete answers, but this has been > something I've been thinking about as well. You can quite easily narrow the > scope of data a function has access to, but it's very hard to widen it > again. > > - James > > > O

Deterministic Randomness in Functional Clojure

2014-10-28 Thread Isaac Karth
I've been working on some projects (roguelikes, story-generators) that often have a reason to have a random outcome for things like procedurally generating a map. Ideally, they would be deterministically psuduorandom, so that I can generate the same results from the same seed. The part I'm havi