Clojure is a programming language created in 2007 by Rich Hickey.
Clojure ( , like "closure") is a dialect of the Lisp programming language. Clojure is a general-purpose programming language with an emphasis on functional programming. It runs on the Java virtual machine and the Common Language Runtime. Read more on Wikipedia...
Try now: Riju ยท TIO ยท Replit
#29on PLDB | 15Years Old | 44.9kUsers |
(println "Hello, world!")
(println "Hello World")
; Hello world in Clojure
(defn hello []
(println "Hello world!"))
(hello)
(defn rand
"Returns a random floating point number between 0 (inclusive) and
n (default 1) (exclusive)."
([] (scm* [n] (random-real)))
([n] (* (rand) n)))
([382 318 466 963 619 22 21 273 45 596] [808 639 804 471 394 904 952 75 289 778] ...
[484 216 622 139 651 592 379 228 242 355])
Distinct: 1000
Feature | Supported | Example | Token |
---|---|---|---|
Integers | โ | ; -?\d+ |
|
Floats | โ | ; -?\d+\.\d+ |
|
Hexadecimals | โ | ; 0x-?[abcdef\d]+ |
|
MultiLine Comments | โ | (comment A comment ) |
(comment ) |
Print() Debugging | โ | println | |
Homoiconicity | โ | ||
Line Comments | โ | ; A comment |
; |
Operator Overloading | โ | ||
Macros | โ | https://clojure.org/reference/macros |
|
File Imports | โ | (load "fun") (load "files/fun") (load-file "./files/fun.clj") (defproject project-a :dependencies [[org.clojure/clojure "1.5.1"] [project-b "0.1.0"]]) (require '[clojure.string :as string]) (use '[clojure.string :only [split]]) (import 'java.util.Date) (java.util.Date.) (require 'clojure.contrib.def 'clojure.contrib.except 'clojure.contrib.sql) (require '(clojure.contrib def except sql)) |
|
Comments | โ | ||
Partial Application | โ | (defn fun-full [x y] (+ x y)) (fun-full 2 3) (def fun-half (partial fun-full 2)) (fun-half 3) |
|
Strings | โ | "hello world" |
" |
Semantic Indentation | ฯด |
repo | stars | description |
---|---|---|
FiraCode | 38337 | Monospaced font with programming ligatures |
status-react | 2759 | "a free (libre) open source mobile OS for Ethereum" |
clojure-koans | 3168 | A set of exercises for learning Clojure |
re-frame | 3897 | "A Reagent Framework For Writing SPAs in Clojurescript." |
metabase | 16675 | "The simplest fastest way to get business intelligence and analytics to everyone in your company ๐" |
ring | 2869 | Clojure HTTP server abstraction |
LightTable | 10751 | The Light Table IDE โบ |
reagent | 3544 | A minimalistic ClojureScript interface to React.js |
title | author | year | reviews | ratings | rating |
---|---|---|---|---|---|
Programming Clojure | Stuart Halloway | 2009 | 45 | 559 | 3.82 |
Clojure Programming | Chas Emerick | 2011 | 30 | 423 | 4.18 |
Clojure Reactive Programming | Leonardo Borges | 2015 | 1 | 21 | 3.81 |
Clojure Cookbook: Recipes for Functional Programming | Luke VanderHart | 2014 | 5 | 55 | 3.75 |
Clojure High Performance Programming | Shantanu Kumar | 2013 | 4 | 19 | 2.84 |