practicalli / practicalli/clojure
Limiting output of an infinite sequence
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
(set! *print-length* 100)
Prevent lockup if *print-length* is set before running expressions that generate an infinite sequence.
Set *print-length* to nil for no limit on output of evaluation
CIDER sets this to 100 default (check this is correct)
Leiningen configuration
:repl-options map is a the key ``:init` which accepts any arbitrary Clojure form - seel Leiningen example project: https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L372.
You can add the code above to set the print-length to your project.clj or .lein/profiles.clj, which will apply it globally across all projects.
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
Start with the issue's examples in project.clj and .lein/profiles.clj, and review the linked Leiningen sample project plus the noted CIDER default. Identify the repository documentation page where REPL configuration belongs; done means clearly documenting the print-length setting, its nil behavior, and how the configuration applies across projects.
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
- Mostly clear
- Newbie friendliness
- 38/100