SlideShare a Scribd company logo
type Box =
| Yellow
| Green
| Red
| Blue
| White
| Purple






1
2
3
4
5
6
type RandomNumber =
| Num1
| Num2
| Num3
| Num4
| Num5
| Num6
match rnd with
| Num1 -> Yellow
| Num2 -> Green
| Num3 -> Red
| Num4 -> Blue
| Num5 -> White
| Num6 -> Purple






1
2
3
4
5
6






Lose
Lose
Win!
Lose
Lose
Lose
type BoxValue =
| Win of Multiplier
| Loss
and Multiplier = decimal
match box with
| Red -> Win 6M
| _ -> Loss






1
2
3
4
5
6






Lose
Lose
Win!
Lose
Lose
Lose
let box = rng() |> toBox
let value = box |> toValue
{ Box = box; Value = value }






1
2
3
4
5
6






Lose
Lose
Win!
Lose
Lose
Lose






1
2
3
4
5
6






Lose
Lose
Win!
Lose
Lose
Lose
let run times f =
[ 1 .. times ]
|> Seq.map(fun _ -> f())
1/6
1/6
1/6
1/6
1/6
1/6
let payout bets wins =
match bets with
| 0M -> 1M
| _ -> wins / bets
let houseEdge bets wins =
match wins with
| 0M -> 1M
| _ -> bets / wins
House edge
0%
Payout
100%
match box with
| Red -> Win 5M
| _ -> Loss
House edge
16%
Payout
84%






1
2
3
4
5
6






Lose
Lose
Win!
Lose
Lose
Lose






1 2
3
4 5 6






Lose
Lose
Win!
Lose
Lose
Lose
match rnd with
| Num1 | Num2 -> Green
| Num3 -> Red
| Num4 | Num5 | Num6 -> Blue
0/6
2/6
1/6
3/6
0/6
0/6
House edge
16%
Payout
84%
public interface IStatefulAggregate<TState>
{
TState State();
}
public interface IEventRecordingAggregate
{
IEnumerable<object> Events();
}
new Scenario<Player, PlayerState>()
.Given(() => Player.Register("1", "jef"))
.When(sut => sut.Lock())
.ThenState(new PlayerState()
{ Id = "1", Locked = true, Nickname = "jef" })
.ThenEvent(new PlayerRegistered("1", "jef"))
.ThenEvent(new PlayerLocked("1"))
.Run();
@

More Related Content

What's hot

Math-Eng grade 2 addition
Math-Eng grade 2 additionMath-Eng grade 2 addition
Math-Eng grade 2 addition
arunrat bamrungchit
 
Subtraction
SubtractionSubtraction
Subtraction
anumrehan1
 
Multiples and Common Multiples
Multiples and Common MultiplesMultiples and Common Multiples
Multiples and Common Multiples
Johdener14
 
Subtracting integers
Subtracting integersSubtracting integers
Subtracting integers
rinabells
 
Factors, multiples and primes
Factors, multiples and primesFactors, multiples and primes
Factors, multiples and primes
suntert
 
PEMDAS
PEMDASPEMDAS
PEMDAS
Sean McBride
 
Powerpoint
PowerpointPowerpoint
Powerpoint
polsg1sa
 
3. multiples, factors and primes
3. multiples, factors and primes3. multiples, factors and primes
3. multiples, factors and primes
Dreams4school
 
October 21, 2013
October 21, 2013October 21, 2013
October 21, 2013khyps13
 
Adding Mixed Numbers
Adding Mixed NumbersAdding Mixed Numbers
Adding Mixed NumbersDan O'Brien
 
Order Of Operations
Order Of OperationsOrder Of Operations
Order Of Operations
kimharpe
 
Adding and subtracting
Adding and subtractingAdding and subtracting
Adding and subtractingDiana Pineda
 
2.3 subtraction integers ws day 1
2.3 subtraction integers   ws day 12.3 subtraction integers   ws day 1
2.3 subtraction integers ws day 1bweldon
 
Game theory lecture
Game theory   lectureGame theory   lecture
Game theory lecture
Prashant Khandelwal
 
Factorials
FactorialsFactorials
Factorials
teamxxlp
 
Game theory 2011
Game theory 2011Game theory 2011
Game theory 2011chaitu87
 

What's hot (19)

Math-Eng grade 2 addition
Math-Eng grade 2 additionMath-Eng grade 2 addition
Math-Eng grade 2 addition
 
027 lesson 17
027 lesson 17027 lesson 17
027 lesson 17
 
Subtraction
SubtractionSubtraction
Subtraction
 
Multiples and Common Multiples
Multiples and Common MultiplesMultiples and Common Multiples
Multiples and Common Multiples
 
Subtracting integers
Subtracting integersSubtracting integers
Subtracting integers
 
Factors, multiples and primes
Factors, multiples and primesFactors, multiples and primes
Factors, multiples and primes
 
Inequalities
InequalitiesInequalities
Inequalities
 
PEMDAS
PEMDASPEMDAS
PEMDAS
 
Powerpoint
PowerpointPowerpoint
Powerpoint
 
3. multiples, factors and primes
3. multiples, factors and primes3. multiples, factors and primes
3. multiples, factors and primes
 
October 21, 2013
October 21, 2013October 21, 2013
October 21, 2013
 
4-Cm8 11-12
4-Cm8 11-124-Cm8 11-12
4-Cm8 11-12
 
Adding Mixed Numbers
Adding Mixed NumbersAdding Mixed Numbers
Adding Mixed Numbers
 
Order Of Operations
Order Of OperationsOrder Of Operations
Order Of Operations
 
Adding and subtracting
Adding and subtractingAdding and subtracting
Adding and subtracting
 
2.3 subtraction integers ws day 1
2.3 subtraction integers   ws day 12.3 subtraction integers   ws day 1
2.3 subtraction integers ws day 1
 
Game theory lecture
Game theory   lectureGame theory   lecture
Game theory lecture
 
Factorials
FactorialsFactorials
Factorials
 
Game theory 2011
Game theory 2011Game theory 2011
Game theory 2011
 

Viewers also liked

Model storming
Model stormingModel storming
Model storming
Alberto Brandolini
 
Event storming recipes
Event storming recipesEvent storming recipes
Event storming recipes
Alberto Brandolini
 
The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2
Jef Claes
 
What if we stored events instead of state?
What if we stored events instead of state?What if we stored events instead of state?
What if we stored events instead of state?
Jef Claes
 
Agile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agileAgile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agileNikita Filippov
 
Model storming - a different approach to collaborative model discovery (Vilni...
Model storming - a different approach to collaborative model discovery (Vilni...Model storming - a different approach to collaborative model discovery (Vilni...
Model storming - a different approach to collaborative model discovery (Vilni...
Alberto Brandolini
 
DDD Dirty Harry style
DDD Dirty Harry styleDDD Dirty Harry style
DDD Dirty Harry style
Alberto Brandolini
 
Projections explained
Projections explainedProjections explained
Projections explained
Yves Reynhout
 
Transactions redefined
Transactions redefinedTransactions redefined
Transactions redefined
Alberto Brandolini
 
Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
Richard Dingwall
 
The final words about software estimation
The final words about software estimationThe final words about software estimation
The final words about software estimation
Alberto Brandolini
 

Viewers also liked (11)

Model storming
Model stormingModel storming
Model storming
 
Event storming recipes
Event storming recipesEvent storming recipes
Event storming recipes
 
The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2
 
What if we stored events instead of state?
What if we stored events instead of state?What if we stored events instead of state?
What if we stored events instead of state?
 
Agile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agileAgile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agile
 
Model storming - a different approach to collaborative model discovery (Vilni...
Model storming - a different approach to collaborative model discovery (Vilni...Model storming - a different approach to collaborative model discovery (Vilni...
Model storming - a different approach to collaborative model discovery (Vilni...
 
DDD Dirty Harry style
DDD Dirty Harry styleDDD Dirty Harry style
DDD Dirty Harry style
 
Projections explained
Projections explainedProjections explained
Projections explained
 
Transactions redefined
Transactions redefinedTransactions redefined
Transactions redefined
 
Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
 
The final words about software estimation
The final words about software estimationThe final words about software estimation
The final words about software estimation
 

More from Jef Claes

NCrafts Eventstorming workshop
NCrafts Eventstorming workshopNCrafts Eventstorming workshop
NCrafts Eventstorming workshop
Jef Claes
 
The Ubiquitous Language
The Ubiquitous LanguageThe Ubiquitous Language
The Ubiquitous Language
Jef Claes
 
Workshop event storming
Workshop event stormingWorkshop event storming
Workshop event storming
Jef Claes
 
Refactoring towards the ubiquitous language
Refactoring towards the ubiquitous languageRefactoring towards the ubiquitous language
Refactoring towards the ubiquitous language
Jef Claes
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)Jef Claes
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On Fire
Jef Claes
 

More from Jef Claes (7)

NCrafts Eventstorming workshop
NCrafts Eventstorming workshopNCrafts Eventstorming workshop
NCrafts Eventstorming workshop
 
The Ubiquitous Language
The Ubiquitous LanguageThe Ubiquitous Language
The Ubiquitous Language
 
Workshop event storming
Workshop event stormingWorkshop event storming
Workshop event storming
 
Refactoring towards the ubiquitous language
Refactoring towards the ubiquitous languageRefactoring towards the ubiquitous language
Refactoring towards the ubiquitous language
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On Fire
 

Recently uploaded

Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 

Recently uploaded (20)

Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 

Evil By Design