SlideShare a Scribd company logo
LDC 14/11/2011
3 clojures funcions
      Set - Rearrange


reset!
compare-and-set!
commute
user=> (doc reset!)
-------------------------
([atom newval])
  Sets the value of atom to newval without regard for the
current value. Returns newval.
compare-and-set!
-------------------------
([atom oldval newval])
  Atomically sets the value of atom to newval if and only if
the current value of the atom is identical to oldval. Returns
true if set happened, else false
commute
-------------------------
([ref fun & args])

  Must be called in a transaction. Sets the in-transaction-value of ref
to:
  (apply fun in-transaction-value-of-ref args)
  and returns the in-transaction-value of ref.
  At the commit point of the transaction, sets the value of ref to be:
  (apply fun most-recently-committed-value-of-ref args)
  Thus fun should be commutative, or, failing that, you must accept
  last-one-in-wins behavior. commute allows for more concurrency
than ref-set.
partition-*
Clojure LDC 5
Clojure LDC 5
Clojure LDC 5

More Related Content

What's hot

Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOPTaming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOP
Donald Belcham
 
The Power of Rails 2.3 Engines & Templates
The Power of Rails 2.3 Engines & TemplatesThe Power of Rails 2.3 Engines & Templates
The Power of Rails 2.3 Engines & Templates
Tse-Ching Ho
 
Real world scala
Real world scalaReal world scala
Real world scala
lunfu zhong
 

What's hot (12)

Test Automation Using Googletest
Test Automation Using GoogletestTest Automation Using Googletest
Test Automation Using Googletest
 
Testing Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnitTesting Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnit
 
Source Plugins
Source PluginsSource Plugins
Source Plugins
 
Durable Functions
Durable FunctionsDurable Functions
Durable Functions
 
Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOPTaming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOP
 
Array and functions
Array and functionsArray and functions
Array and functions
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
h-ubu : CDI in JavaScript
h-ubu : CDI in JavaScripth-ubu : CDI in JavaScript
h-ubu : CDI in JavaScript
 
Austin Bingham. Transducers in Python. PyCon Belarus
Austin Bingham. Transducers in Python. PyCon BelarusAustin Bingham. Transducers in Python. PyCon Belarus
Austin Bingham. Transducers in Python. PyCon Belarus
 
How to practice functional programming in react
How to practice functional programming in reactHow to practice functional programming in react
How to practice functional programming in react
 
The Power of Rails 2.3 Engines & Templates
The Power of Rails 2.3 Engines & TemplatesThe Power of Rails 2.3 Engines & Templates
The Power of Rails 2.3 Engines & Templates
 
Real world scala
Real world scalaReal world scala
Real world scala
 

Viewers also liked

魏权龄_数据包络分析法
魏权龄_数据包络分析法魏权龄_数据包络分析法
魏权龄_数据包络分析法
kakaluv
 
Store accesory the best2
Store accesory the best2Store accesory the best2
Store accesory the best2
lino
 
Wind Power Df Intro Uk
Wind Power Df Intro UkWind Power Df Intro Uk
Wind Power Df Intro Uk
janrud
 
Dosificación y jerarquización 2016 2017 (1)
Dosificación y jerarquización 2016 2017 (1)Dosificación y jerarquización 2016 2017 (1)
Dosificación y jerarquización 2016 2017 (1)
IEEPO
 
Te amo-diapositivas
Te amo-diapositivasTe amo-diapositivas
Te amo-diapositivas
214205
 
Exposicion sobre Vidrios
Exposicion sobre VidriosExposicion sobre Vidrios
Exposicion sobre Vidrios
Diego Garcia
 

Viewers also liked (19)

Elis apresentacio cranio12
Elis apresentacio cranio12Elis apresentacio cranio12
Elis apresentacio cranio12
 
Os gi lightning talk
Os gi lightning talkOs gi lightning talk
Os gi lightning talk
 
Ignoring Internet is Injurious to Medical Practice
Ignoring Internet is Injurious to Medical PracticeIgnoring Internet is Injurious to Medical Practice
Ignoring Internet is Injurious to Medical Practice
 
魏权龄_数据包络分析法
魏权龄_数据包络分析法魏权龄_数据包络分析法
魏权龄_数据包络分析法
 
Datomic
DatomicDatomic
Datomic
 
Store accesory the best2
Store accesory the best2Store accesory the best2
Store accesory the best2
 
E20C Workshop: E20 & OE
E20C Workshop: E20 & OEE20C Workshop: E20 & OE
E20C Workshop: E20 & OE
 
Facts about RBI Governer Raghuram Rajan
Facts about RBI Governer Raghuram RajanFacts about RBI Governer Raghuram Rajan
Facts about RBI Governer Raghuram Rajan
 
HBK Heroes & Achievements
HBK Heroes & AchievementsHBK Heroes & Achievements
HBK Heroes & Achievements
 
Orientation Day Presentation (Personalized Learning)
Orientation Day Presentation (Personalized Learning) Orientation Day Presentation (Personalized Learning)
Orientation Day Presentation (Personalized Learning)
 
Wind Power Df Intro Uk
Wind Power Df Intro UkWind Power Df Intro Uk
Wind Power Df Intro Uk
 
Dosificación y jerarquización 2016 2017 (1)
Dosificación y jerarquización 2016 2017 (1)Dosificación y jerarquización 2016 2017 (1)
Dosificación y jerarquización 2016 2017 (1)
 
Requirements E20 Manager
Requirements E20 ManagerRequirements E20 Manager
Requirements E20 Manager
 
Gettysburg
GettysburgGettysburg
Gettysburg
 
Social Messaging Solution Matrix
Social Messaging Solution MatrixSocial Messaging Solution Matrix
Social Messaging Solution Matrix
 
Te amo-diapositivas
Te amo-diapositivasTe amo-diapositivas
Te amo-diapositivas
 
Coaching with the brain in mind
Coaching with the brain in mindCoaching with the brain in mind
Coaching with the brain in mind
 
Big data: Loading your data with flume and sqoop
Big data:  Loading your data with flume and sqoopBig data:  Loading your data with flume and sqoop
Big data: Loading your data with flume and sqoop
 
Exposicion sobre Vidrios
Exposicion sobre VidriosExposicion sobre Vidrios
Exposicion sobre Vidrios
 

More from Christophe Marchal

More from Christophe Marchal (20)

Elasticsearch avoiding hotspots
Elasticsearch  avoiding hotspotsElasticsearch  avoiding hotspots
Elasticsearch avoiding hotspots
 
Performance
PerformancePerformance
Performance
 
Alluxio
AlluxioAlluxio
Alluxio
 
Elasticsearch cluster deep dive
Elasticsearch  cluster deep diveElasticsearch  cluster deep dive
Elasticsearch cluster deep dive
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Reactive programming with Rxjava
Reactive programming with RxjavaReactive programming with Rxjava
Reactive programming with Rxjava
 
Terraform
TerraformTerraform
Terraform
 
Consul in 5 minutes
Consul in 5 minutesConsul in 5 minutes
Consul in 5 minutes
 
Spark in 15 min
Spark in 15 minSpark in 15 min
Spark in 15 min
 
Microservices Architecture: Nirvana or Nightmare
Microservices Architecture: Nirvana or NightmareMicroservices Architecture: Nirvana or Nightmare
Microservices Architecture: Nirvana or Nightmare
 
Capistrano
CapistranoCapistrano
Capistrano
 
Aws, play! couch db scaling soa in the cloud
Aws, play! couch db  scaling soa in the cloudAws, play! couch db  scaling soa in the cloud
Aws, play! couch db scaling soa in the cloud
 
Devops e a nova cultura - TDC Florianopolis 2015
Devops e a nova cultura - TDC Florianopolis 2015Devops e a nova cultura - TDC Florianopolis 2015
Devops e a nova cultura - TDC Florianopolis 2015
 
Devops and the New Culture
Devops and the New CultureDevops and the New Culture
Devops and the New Culture
 
CUDA
CUDACUDA
CUDA
 
Monads in practice
Monads in practiceMonads in practice
Monads in practice
 
Productivity and scalability with Play and Scala
Productivity and scalability with Play and ScalaProductivity and scalability with Play and Scala
Productivity and scalability with Play and Scala
 
Reactive application
Reactive applicationReactive application
Reactive application
 
Internet of things and arduino
Internet of things and arduinoInternet of things and arduino
Internet of things and arduino
 
Hbase
HbaseHbase
Hbase
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 

Clojure LDC 5