clojure
Clojure functional programming on the JVM with immutable data. Use for .clj files.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Clojure
A Lisp hosted on the JVM (and JS via ClojureScript) with a focus on immutability.
When to Use
- Data processing
- Concurrency (Software Transactional Memory)
- Web development
- JVM interop needed
Quick Start
(println "Hello, World!")
(defn square [x]
(* x x))
(map square [1 2 3]) ; (1 4 9)
Core Concepts
Persistent Data Structures
Immutable lists, vectors, maps, and sets that structurally share data to be efficient.
REPL Driven Development
Writing code interactively in a Running Eval-Print Loop.
Macros
Code that takes code as input and returns code.
Best Practices
Do:
- Use the REPL
- Use threading macros
->and->>to make code readable - Leverage JVM libraries
Don't:
- Use atoms/agents/refs unless you need mutable state
- Write deeply nested parentheses (use structural editing)
References
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!