SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
Clojure
● LISP on the JVM
● Dynamic
● Started in 2007 by Rich Hickey
● 3 years of planning
● Current version - 1.6.0
● Eclipse license
Defining Features
● LISP syntax but not Common LISP or Scheme
– Macros
● Immutability
● Functional
● JVM based
– Java interop
– Not OOP
● Supports Concurrency
Syntax
● Numbers: 1234, 1.234, 1.234M
● Ratios: 22/7
● Strings: “foo”, “bar”, Characters: a b c
● Symbols: foo, bar, Keywords: :foo, :bar
● Boolean: true, false, Null: nil
● Regex Patterns: #”a*b”
Data Structures
● Lists – singly linked, grow at front:
– (1 2 3 4)
● Vectors – indexed, grow at end:
– [1 2 3 4]
● Maps – key/value associations:
– {:a 1 :b 2 :c 3}
● Sets: #{:a :b :c}
● Everything nests inside each other
Syntax
● That's the entire syntax
● Data strcuture are the code (Homoiconicity)
● All data literals stand for themselves except:
– Lists (IFn invocation)
– Symbols (“pointers”)
Lists as Invocations Example
● (+ 1 1) => 2
● (+ 1 2 (+ 3 4 5)) => 15
● (first [:a :b :c]) => :a
● (rest [:a :b :c]) => (:b :c)
● (class “foo”) => java.lang.String
● (class 1) => java.long.Long
Persistent Data Structures
● All Clojure data structures are persistent
● Collections maintain performance guarantees:
– New + Old version of collections are available after
change
– New versions are not full copies
– Thread safe, iteration safe
● Sequences replace traditional lists
– All Clojure and Java collections can be made into
seqs
Persistent Data Structure
Performance
● O(log32 N) ~= O(1)
A
B C
D E F G
H I J K L M N'
A’
C’
G’
N
Seq General Macros
● All seqs, which means all lists, vectors, hash-
maps, hash-sets, strings etc. can use the multi
purpose seq macros. A kind of polymorphism
over collections.
(def xs [:a :b :c])
– (first xs) => :a , (rest xs) => (:b :c)
– (count xs) => 3 , (contains? xs :d) => false
– (remove #(= % :b) xs) => (:a :c)
– (nth xs 2) => :c
Laziness
● Seqs can be lazy
– (repeat :a) => (:a :a :a :a :a …)
● Processing is delayed until the seq is realized:
– (class (repeat :a)) => clojure.lang.LazySeq
● Realize part of a lazy seq:
– (take 3 (repeat :a)) => (:a :a :a)
Philosophy
● Use libraries instead of frameworks
● REPL first development
– Small and isolated functions
● Data structures instead of classes
DEMO
Java Interop
● (.toLowerCase “AppsFlyer”) => “appsflyer”
– (.<method> <object> [<arg1> …])
● (Foo. “bar”) => #<Foo bar>
– (<class>. [<constrcutor arg1>...])
● (Integer/parseInt “5”) => 5
– (<class>/<static method> [<arg1>...])
● (.contains “AppsFlyer FTW” “FTW”) => true
Concurrency
● Clojure uses STM – no locks in the code
– Multiversion Concurrency Control (MVCC)
– Readers never impede writers and writers never impeded
readers
● 3 primitive containers to store mutable data – atom, ref,
agent
– Refs – coordinated-sync access to many identities
– Atoms – Uncoordinated-sync access to a single identity
– Agents – Uncoordinated-async access to a single identity
So Much More...
● Metadata
● Optimized tail recursion
● Destructuring binding in let/fn/loop
● List comprehensions
● Multimethods
● Parallel computations
● Macros

Más contenido relacionado

La actualidad más candente

Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
shimi_k
 
Lisp for Python Programmers
Lisp for Python ProgrammersLisp for Python Programmers
Lisp for Python Programmers
Vsevolod Dyomkin
 

La actualidad más candente (20)

2013 05 ny
2013 05 ny2013 05 ny
2013 05 ny
 
Frontend application architecture, patterns, and workflows
Frontend application architecture, patterns, and workflowsFrontend application architecture, patterns, and workflows
Frontend application architecture, patterns, and workflows
 
JDK8 Functional API
JDK8 Functional APIJDK8 Functional API
JDK8 Functional API
 
Java JVM Memory Cheat Sheet
Java JVM Memory Cheat SheetJava JVM Memory Cheat Sheet
Java JVM Memory Cheat Sheet
 
Towards hasktorch 1.0
Towards hasktorch 1.0Towards hasktorch 1.0
Towards hasktorch 1.0
 
scala-gopher: async implementation of CSP for scala
scala-gopher:  async implementation of CSP  for  scalascala-gopher:  async implementation of CSP  for  scala
scala-gopher: async implementation of CSP for scala
 
Clojure/conj 2017
Clojure/conj 2017Clojure/conj 2017
Clojure/conj 2017
 
SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.
 
Modern frontend in react.js
Modern frontend in react.jsModern frontend in react.js
Modern frontend in react.js
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Lisp for Python Programmers
Lisp for Python ProgrammersLisp for Python Programmers
Lisp for Python Programmers
 
Xanadu - Java Chapter Meeting
Xanadu - Java Chapter Meeting Xanadu - Java Chapter Meeting
Xanadu - Java Chapter Meeting
 
Csp scala wixmeetup2016
Csp scala wixmeetup2016Csp scala wixmeetup2016
Csp scala wixmeetup2016
 
Meet the-other-elephant
Meet the-other-elephantMeet the-other-elephant
Meet the-other-elephant
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015
 
Onyx
OnyxOnyx
Onyx
 
MathML: onde estamos?
MathML: onde estamos?MathML: onde estamos?
MathML: onde estamos?
 
Incremental Development with Lisp: Building a Game and a Website
Incremental Development with Lisp: Building a Game and a WebsiteIncremental Development with Lisp: Building a Game and a Website
Incremental Development with Lisp: Building a Game and a Website
 
Coding convention
Coding conventionCoding convention
Coding convention
 
DB reading group may 16, 2018
DB reading group may 16, 2018DB reading group may 16, 2018
DB reading group may 16, 2018
 

Similar a Clojure - LISP on the JVM

Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
elliando dias
 
Design and Implementation of the Security Graph Language
Design and Implementation of the Security Graph LanguageDesign and Implementation of the Security Graph Language
Design and Implementation of the Security Graph Language
Asankhaya Sharma
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional Paradigms
Miles Sabin
 
Rust All Hands Winter 2011
Rust All Hands Winter 2011Rust All Hands Winter 2011
Rust All Hands Winter 2011
Patrick Walton
 
From Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn IntroductionFrom Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn Introduction
elliando dias
 

Similar a Clojure - LISP on the JVM (20)

Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
Design and Implementation of the Security Graph Language
Design and Implementation of the Security Graph LanguageDesign and Implementation of the Security Graph Language
Design and Implementation of the Security Graph Language
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
 
Thorny Path to the Large Scale Graph Processing, Алексей Зиновьев (Тамтэк)
Thorny Path to the Large Scale Graph Processing, Алексей Зиновьев (Тамтэк)Thorny Path to the Large Scale Graph Processing, Алексей Зиновьев (Тамтэк)
Thorny Path to the Large Scale Graph Processing, Алексей Зиновьев (Тамтэк)
 
Thorny path to the Large-Scale Graph Processing (Highload++, 2014)
Thorny path to the Large-Scale Graph Processing (Highload++, 2014)Thorny path to the Large-Scale Graph Processing (Highload++, 2014)
Thorny path to the Large-Scale Graph Processing (Highload++, 2014)
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional Paradigms
 
A brief introduction to lisp language
A brief introduction to lisp languageA brief introduction to lisp language
A brief introduction to lisp language
 
Rust All Hands Winter 2011
Rust All Hands Winter 2011Rust All Hands Winter 2011
Rust All Hands Winter 2011
 
MATLAB Programming
MATLAB Programming MATLAB Programming
MATLAB Programming
 
R programmingmilano
R programmingmilanoR programmingmilano
R programmingmilano
 
MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
From Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn IntroductionFrom Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn Introduction
 
Matlab lec1
Matlab lec1Matlab lec1
Matlab lec1
 
Java 8
Java 8Java 8
Java 8
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play framework
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
HPC Essentials 0
HPC Essentials 0HPC Essentials 0
HPC Essentials 0
 
ClojureScript for the web
ClojureScript for the webClojureScript for the web
ClojureScript for the web
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
 
Stripe CTF3 wrap-up
Stripe CTF3 wrap-upStripe CTF3 wrap-up
Stripe CTF3 wrap-up
 

Más de Tikal Knowledge

Processing Big Data in Realtime
Processing Big Data in RealtimeProcessing Big Data in Realtime
Processing Big Data in Realtime
Tikal Knowledge
 
Docking your services_with_docker
Docking your services_with_dockerDocking your services_with_docker
Docking your services_with_docker
Tikal Knowledge
 
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
Tikal Fuse Day   Access Layer Implementation (C#) Based On Mongo DbTikal Fuse Day   Access Layer Implementation (C#) Based On Mongo Db
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
Tikal Knowledge
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
Tikal Knowledge
 

Más de Tikal Knowledge (20)

Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...
 
Kafka short
Kafka shortKafka short
Kafka short
 
Heatmap
HeatmapHeatmap
Heatmap
 
Processing Big Data in Realtime
Processing Big Data in RealtimeProcessing Big Data in Realtime
Processing Big Data in Realtime
 
Docking your services_with_docker
Docking your services_with_dockerDocking your services_with_docker
Docking your services_with_docker
 
Who moved my_box
Who moved my_boxWho moved my_box
Who moved my_box
 
Writing a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media playerWriting a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media player
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Tikal's Backbone_js introduction workshop
Tikal's Backbone_js introduction workshopTikal's Backbone_js introduction workshop
Tikal's Backbone_js introduction workshop
 
TCE Automation
TCE AutomationTCE Automation
TCE Automation
 
Tce automation-d4
Tce automation-d4Tce automation-d4
Tce automation-d4
 
Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?" Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?"
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
Tikal Fuse Day   Access Layer Implementation (C#) Based On Mongo DbTikal Fuse Day   Access Layer Implementation (C#) Based On Mongo Db
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
 
Ship early ship often with Django
Ship early ship often with DjangoShip early ship often with Django
Ship early ship often with Django
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
AWS Case Study
AWS Case StudyAWS Case Study
AWS Case Study
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
 
Building Components In Flex3
Building Components In Flex3Building Components In Flex3
Building Components In Flex3
 
Osgi Democamp
Osgi DemocampOsgi Democamp
Osgi Democamp
 

Último

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Último (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 

Clojure - LISP on the JVM

  • 1. Clojure ● LISP on the JVM ● Dynamic ● Started in 2007 by Rich Hickey ● 3 years of planning ● Current version - 1.6.0 ● Eclipse license
  • 2. Defining Features ● LISP syntax but not Common LISP or Scheme – Macros ● Immutability ● Functional ● JVM based – Java interop – Not OOP ● Supports Concurrency
  • 3. Syntax ● Numbers: 1234, 1.234, 1.234M ● Ratios: 22/7 ● Strings: “foo”, “bar”, Characters: a b c ● Symbols: foo, bar, Keywords: :foo, :bar ● Boolean: true, false, Null: nil ● Regex Patterns: #”a*b”
  • 4. Data Structures ● Lists – singly linked, grow at front: – (1 2 3 4) ● Vectors – indexed, grow at end: – [1 2 3 4] ● Maps – key/value associations: – {:a 1 :b 2 :c 3} ● Sets: #{:a :b :c} ● Everything nests inside each other
  • 5. Syntax ● That's the entire syntax ● Data strcuture are the code (Homoiconicity) ● All data literals stand for themselves except: – Lists (IFn invocation) – Symbols (“pointers”)
  • 6. Lists as Invocations Example ● (+ 1 1) => 2 ● (+ 1 2 (+ 3 4 5)) => 15 ● (first [:a :b :c]) => :a ● (rest [:a :b :c]) => (:b :c) ● (class “foo”) => java.lang.String ● (class 1) => java.long.Long
  • 7. Persistent Data Structures ● All Clojure data structures are persistent ● Collections maintain performance guarantees: – New + Old version of collections are available after change – New versions are not full copies – Thread safe, iteration safe ● Sequences replace traditional lists – All Clojure and Java collections can be made into seqs
  • 8. Persistent Data Structure Performance ● O(log32 N) ~= O(1) A B C D E F G H I J K L M N' A’ C’ G’ N
  • 9. Seq General Macros ● All seqs, which means all lists, vectors, hash- maps, hash-sets, strings etc. can use the multi purpose seq macros. A kind of polymorphism over collections. (def xs [:a :b :c]) – (first xs) => :a , (rest xs) => (:b :c) – (count xs) => 3 , (contains? xs :d) => false – (remove #(= % :b) xs) => (:a :c) – (nth xs 2) => :c
  • 10. Laziness ● Seqs can be lazy – (repeat :a) => (:a :a :a :a :a …) ● Processing is delayed until the seq is realized: – (class (repeat :a)) => clojure.lang.LazySeq ● Realize part of a lazy seq: – (take 3 (repeat :a)) => (:a :a :a)
  • 11. Philosophy ● Use libraries instead of frameworks ● REPL first development – Small and isolated functions ● Data structures instead of classes
  • 12. DEMO
  • 13. Java Interop ● (.toLowerCase “AppsFlyer”) => “appsflyer” – (.<method> <object> [<arg1> …]) ● (Foo. “bar”) => #<Foo bar> – (<class>. [<constrcutor arg1>...]) ● (Integer/parseInt “5”) => 5 – (<class>/<static method> [<arg1>...]) ● (.contains “AppsFlyer FTW” “FTW”) => true
  • 14. Concurrency ● Clojure uses STM – no locks in the code – Multiversion Concurrency Control (MVCC) – Readers never impede writers and writers never impeded readers ● 3 primitive containers to store mutable data – atom, ref, agent – Refs – coordinated-sync access to many identities – Atoms – Uncoordinated-sync access to a single identity – Agents – Uncoordinated-async access to a single identity
  • 15. So Much More... ● Metadata ● Optimized tail recursion ● Destructuring binding in let/fn/loop ● List comprehensions ● Multimethods ● Parallel computations ● Macros