Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wdhowe/clojure-snippets
Clojure syntax examples.
https://github.com/wdhowe/clojure-snippets
clojure clojure-snippets
Last synced: 2 months ago
JSON representation
Clojure syntax examples.
- Host: GitHub
- URL: https://github.com/wdhowe/clojure-snippets
- Owner: wdhowe
- License: gpl-3.0
- Created: 2020-03-15T23:23:44.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-07T05:14:01.000Z (about 1 year ago)
- Last Synced: 2024-02-07T06:25:05.096Z (about 1 year ago)
- Topics: clojure, clojure-snippets
- Language: Clojure
- Homepage:
- Size: 113 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clojure-snippets
Clojure example snippets.
Short files that demonstrate syntax and concepts.
----
## Execute
Run individual snippet files via clj -M FILENAME.
Example:
```bash
clj -M basic_syntax/hello_world.clj
```Output
```bash
Hello Clojure world!
```## Descriptions
Snippets
* abstractions -> Creating abstractions with multimethods, protocols, and records.
* basic_syntax -> Getting started with basic syntax. (hello world, math operators, comparison operators, variables)
* concurrency -> Processing on multiple threads concurrently. (futures, delays, promises, core.async)
* data_structures -> Core data types and destructuring them. (lists, maps, sets, vectors)
* file_operations -> Interacting with files and EDN for configuration.
* flow_control -> Flow control concepts. (case, cond, exceptions, if, do, when)
* functions -> Anonymous functions/lambda, multi-arity, composing functions, functions that accept and return functions (apply, partial).
* http -> Http/get examples.
* iter_recur -> Iteration and recursion.
* java_interop -> Using Java's methods, objects, libraries.
* macros -> Macro definition examples.
* misc -> Miscellaneous items. (date, fizz buzz)
* seq_col_funcs -> Core functions that operate against sequence elements and entire collections. (filter, map, reduce, etc)
* state -> Using state like behavior. (atoms, watchers, validators)Templates
* template -> Template for a Clojure CLI/deps project with cli args.
----
## Resources to Get Started
* [Install Clojure](https://gist.github.com/wdhowe/e6fc5e372b85ad8a25fdebf446b1a3e6)
* [REPL Help](https://gist.github.com/wdhowe/4125856d72714724072f4f6b007273a8)
* [Creating projects with CLI/Deps](https://gist.github.com/wdhowe/99a4f463f96730002f4c20a058806dda)
* [Creating projects with Leiningen](https://gist.github.com/wdhowe/78bececa96e577bf26139e4bdc501d47)
* [Installing plugins for Leiningen](https://gist.github.com/wdhowe/a7df51d5ad2e7f969d78a3bc395f8a88)----