2011/4/1 Ken Wesson kwess...@gmail.com
On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
2011/3/31 Ken Wesson kwess...@gmail.com
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT
laurent.pe...@gmail.com
wrote:
Except in 1.3 it will be a little bit harder
On Fri, Apr 1, 2011 at 1:59 AM, Laurent PETIT laurent.pe...@gmail.com wrote:
2011/4/1 Ken Wesson kwess...@gmail.com
On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
2011/3/31 Ken Wesson kwess...@gmail.com
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT
2011/4/1 Ken Wesson kwess...@gmail.com
On Fri, Apr 1, 2011 at 1:59 AM, Laurent PETIT laurent.pe...@gmail.com
wrote:
2011/4/1 Ken Wesson kwess...@gmail.com
On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
2011/3/31 Ken Wesson kwess...@gmail.com
On
2011/3/31 Ken Wesson kwess...@gmail.com
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
Except in 1.3 it will be a little bit harder to do throw-away
per-thread
memoizes for vars you do no own if their author didn't make their
holding
var :dynamic ('cause
On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
2011/3/31 Ken Wesson kwess...@gmail.com
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
Except in 1.3 it will be a little bit harder to do throw-away
per-thread
memoizes for vars
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
Except in 1.3 it will be a little bit harder to do throw-away per-thread
memoizes for vars you do no own if their author didn't make their holding
var :dynamic ('cause then you will not be able to rebind them).
I just saw this in another thread. Try this version instead:
(defn f [n]
(println f called with n)
(if (zero? n)
0
(min (#'f (dec n))
(#'f (dec n)
What's happening is that inside the body of f, the f is a symbol
whose contents point to the anonymous function being
Andreas, Mark, thank you for your suggestions. Both worked splendidly.
Just out of curiosity, does memoize in 1.3 behave like the current 1.2
version or the 1.1 version?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
On Tue, Mar 29, 2011 at 8:31 AM, Benny Tsai benny.t...@gmail.com wrote:
Just out of curiosity, does memoize in 1.3 behave like the current 1.2
version or the 1.1 version?
user= (clojure-version)
1.3.0-alpha4
user= (defn f [n]
(println f called with n)
(if (zero? n)
0
(min (f (dec
Fantastic! Thank you Sean.
On Tuesday, March 29, 2011 11:37:06 AM UTC-6, Sean Corfield wrote:
On Tue, Mar 29, 2011 at 8:31 AM, Benny Tsai benny...@gmail.com wrote:
Just out of curiosity, does memoize in 1.3 behave like the current 1.2
version or the 1.1 version?
user= (clojure-version)
I was playing with memoize when I ran into some puzzling behavior. A test
case:
(defn f [n]
(println f called with n)
(if (zero? n)
0
(min (f (dec n))
(f (dec n)
(def f (memoize f))
*The usage of def to rebind a function to its memoized version is taken
from
11 matches
Mail list logo