SlideShare a Scribd company logo
2specsGo functional!
2specs
       tourimportIncredibleStringReverser._classReverserSpecextends Specification {"a reversed empty string must be empty" in {    reverse("") must_== ""  }"a reversed empty string must really *be empty*" in {    reverse("") must be empty  }"a reversed string must be reversed abc -> cba" in {    reverse("abc") must be_==("cba")  }"a longer string must also be reversed. Whoops!" in {    reverse("abcdef") must be_==("xxxxx")  }}
       tour"a reversed empty string must be empty" in {  reverse("") must be empty}
       tour
     tour
Shame
Mutability
Concurrency
Acceptance
WhyThe ideaUserProgramDesign
Go Functional!But what is it?!
Referential transparency Immutability
Processing data structuresFPOOpipelinedemergentbehaviorbehavior
WhyThe ideaUserProgramDesign
Starting pointinstructions != expressions
NestingPrecedence:+!^
FormattingTextExampleTextExampleExample
Formattingpbrendt, t(i)bt, bt(i)acceptance
Context
doBeforewithDb.apply(e2)
WhyThe ideaUserProgramDesign
Runsequenceto textlevelsto htmlargumentsselectstatisticsexecute
Laziness vs evaluation
Iterating
Traversethe mappingA datastructure to traversethe accumulation
Applicative magic?simpleLots of instances: State
 List
 Monad
MonoidType inference is hard,Let’s go shopping!composable
Reduceraggregationmappingspecs2 reducers: Levels
 Statistics
 Arguments
 Text
 Html“parallel” composition
WhyThe ideaUserProgramDesign
TreesSuiteDescriptionTextTest Description 1Test Description 2Example 1Example 2SuiteDescriptionfChildren = TD1, TD2
TreeLoc
TreeLoc<body><h1>Title 1</h1><h2>part 1</h2><h2>part 2</h2><h1/></body><h2/><h2/>Anti-XMLThe non-violent solution
Concurrency=> Promise[Seq[ExecutedFragment]]a concurrent task2.9.0inside!
Exceptions
Exceptions

More Related Content

PPTX
Ruby Code Optimizations (for beginners)
PPTX
JS Fest 2018. Виталий Ратушный. ES X
PPTX
Javascript ES6
PDF
Welcome To The Marketing Pod
PPTX
The Essence of the Iterator Pattern
PDF
The Essence of the Iterator Pattern (pdf)
PPTX
Bohemians
PPTX
Strong functional programming
Ruby Code Optimizations (for beginners)
JS Fest 2018. Виталий Ратушный. ES X
Javascript ES6
Welcome To The Marketing Pod
The Essence of the Iterator Pattern
The Essence of the Iterator Pattern (pdf)
Bohemians
Strong functional programming

Similar to Specs2 - Scala-Syd presentation (20)

PPTX
Specs2, go functional
PPTX
PDF
Design Patterns in Modern C++
PDF
The Functional Programming Toolkit (NDC Oslo 2019)
PPTX
STACK 20 INTERVIEW QUESTIONS and answers.pptx
PPTX
STACK 20 INTERVIEW QUESTIONS and answers for interview.pptx
PDF
Emerging Languages: A Tour of the Horizon
PDF
Functional Programming in Scala 1st Edition Paul Chiusano
PDF
Functional Programming in Scala 1st Edition Paul Chiusano
DOCX
Lab Manual Data Structure and Algorithm.docx
DOCX
ContentsCOSC 2436 – LAB4TITLE .............................docx
PPTX
Дмитрий Нестерук, Паттерны проектирования в XXI веке
PDF
Data Structure.pdf
DOCX
ObjectivesMore practice with recursion.Practice writing some tem.docx
PPTX
dsppt-141121224848-conversion01 (1).pptx
PPT
PPT
Regular expression made by To Minh Hoang - Portal team
PPT
12650891 (1).ppthhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
PPTX
Class 25: Reversing Reverse
PDF
Functional Programming Patterns (BuildStuff '14)
Specs2, go functional
Design Patterns in Modern C++
The Functional Programming Toolkit (NDC Oslo 2019)
STACK 20 INTERVIEW QUESTIONS and answers.pptx
STACK 20 INTERVIEW QUESTIONS and answers for interview.pptx
Emerging Languages: A Tour of the Horizon
Functional Programming in Scala 1st Edition Paul Chiusano
Functional Programming in Scala 1st Edition Paul Chiusano
Lab Manual Data Structure and Algorithm.docx
ContentsCOSC 2436 – LAB4TITLE .............................docx
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Data Structure.pdf
ObjectivesMore practice with recursion.Practice writing some tem.docx
dsppt-141121224848-conversion01 (1).pptx
Regular expression made by To Minh Hoang - Portal team
12650891 (1).ppthhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Class 25: Reversing Reverse
Functional Programming Patterns (BuildStuff '14)
Ad

More from Eric Torreborre (20)

PDF
Shoehorning dependency injection into a FP language
PDF
Shoehorning dependency injection into a FP language, what does it take?
PDF
Boost your command line applications with potions!
PDF
wire-all-the-things-lambda-days-2023.pdf
PDF
The many faces of modularity
PDF
What haskell taught us when we were not looking
PDF
Wire once, rewire twice! (Haskell exchange-2018)
PDF
Pratical eff-functional-conf
PDF
Specs2, from starters to dessert and... a look in the kitchen
PDF
Streaming, effects and beautiful folds: a winning trilogy
PPTX
Pratical eff-scalaitaly-2017
PDF
Pratical eff monad at Scaladays Chicago
PDF
Pratical eff
PPT
The Eff monad, one monad to rule them all
PPT
Easy di-slideshare
PPT
Data generation, the hard parts
PPT
Origami, a monadic fold library for Scala
PPT
Datatypes for the real world
PPT
Specs2 3.4
PPTX
DSLs with fold algebras
Shoehorning dependency injection into a FP language
Shoehorning dependency injection into a FP language, what does it take?
Boost your command line applications with potions!
wire-all-the-things-lambda-days-2023.pdf
The many faces of modularity
What haskell taught us when we were not looking
Wire once, rewire twice! (Haskell exchange-2018)
Pratical eff-functional-conf
Specs2, from starters to dessert and... a look in the kitchen
Streaming, effects and beautiful folds: a winning trilogy
Pratical eff-scalaitaly-2017
Pratical eff monad at Scaladays Chicago
Pratical eff
The Eff monad, one monad to rule them all
Easy di-slideshare
Data generation, the hard parts
Origami, a monadic fold library for Scala
Datatypes for the real world
Specs2 3.4
DSLs with fold algebras
Ad

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
sap open course for s4hana steps from ECC to s4
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MIND Revenue Release Quarter 2 2025 Press Release
The AUB Centre for AI in Media Proposal.docx
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
sap open course for s4hana steps from ECC to s4
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Specs2 - Scala-Syd presentation