clojure.core.memoize

https://github.com/clojure/core.memoize.git

git clone 'https://github.com/clojure/core.memoize.git'

(ql:quickload :clojure.core.memoize)
209

clojure.core.memoize

core.memoize is a Clojure contrib library providing the following features:

Releases and Dependency Information

Latest stable release: 0.7.2

Leiningen dependency information:

[org.clojure/core.memoize "0.7.2"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.memoize</artifactId>
  <version>0.7.2</version>
</dependency>

Example Usage

    (ns my.cool.lib
      (:require clojure.core.memoize))

    (def id (clojure.core.memoize/lu
              #(do (Thread/sleep 5000) (identity %))
              :lu/threshold 3))

    (id 42)
    ; ... waits 5 seconds
    ;=> 42

    (id 42)
    ; instantly
    ;=> 42

Refer to docstrings in the clojure.core.memoize namespace for more information.

Developer Information

Change Log

Copyright and License

Copyright (c) Rich Hickey and Michael Fogus, 2012, 2013. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license. You must not remove this notice, or any other, from this software.