File: Building.md

package info (click to toggle)
core-memoize-clojure 1.0.257-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 264 kB
  • sloc: xml: 53; sh: 28; makefile: 20
file content (26 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Building core.memoize
=====================

1. Clone the [core.memoize git repository](http://github.com/clojure/core.memoize) or download its [source archive](https://github.com/clojure/core.memoize/zipball/master)

2. Run `mvn package` to generate a Jar file

3. Run `mvn install` to install the Jar into your local Maven repository

To test that the build succeeded try:

    mvn clojure:repl

This will launch a Clojure REPL.  Try the following to exercise core.memoize:

```clojure
(require '[clojure.core.memoize :as memo])

(def f (memo/memo #(do (Thread/sleep 5000) %)))

(f 42)
;; wait 5 seconds
;;=> 42
```

Subsequent calls of the `f` function with the value `42` should return instantly.