practicalli / practicalli/clojure
`def` caching results
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
The first time the def function is called it will cache the results. This makes the call quite efficient in subsequent times.
This can cause confusion if you expect the def value to change, for example
(def not-random (rand-int 1000))
When the repl is restarted or cleared of the def, then the next evaluation of the def expression will generate the value again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no documentation file or test, so first confirm where this explanation belongs and what change is wanted. Reproduce the def example in the Clojure REPL, then consider the work complete when the caching behavior and reset or re-evaluation case are documented in the agreed location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100