SlideShare ist ein Scribd-Unternehmen logo
1 von 99
Downloaden Sie, um offline zu lesen
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();
@

Weitere ähnliche Inhalte

Was ist angesagt?

Multiples and Common Multiples
Multiples and Common MultiplesMultiples and Common Multiples
Multiples and Common MultiplesJohdener14
 
Subtracting integers
Subtracting integersSubtracting integers
Subtracting integersrinabells
 
Factors, multiples and primes
Factors, multiples and primesFactors, multiples and primes
Factors, multiples and primessuntert
 
Powerpoint
PowerpointPowerpoint
Powerpointpolsg1sa
 
3. multiples, factors and primes
3. multiples, factors and primes3. multiples, factors and primes
3. multiples, factors and primesDreams4school
 
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 Operationskimharpe
 
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
 
Factorials
FactorialsFactorials
Factorialsteamxxlp
 
Game theory 2011
Game theory 2011Game theory 2011
Game theory 2011chaitu87
 

Was ist angesagt? (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
 

Andere mochten auch

The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2The Ubiquitous Language DDDBE V2
The Ubiquitous Language DDDBE V2Jef 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
 
Projections explained
Projections explainedProjections explained
Projections explainedYves Reynhout
 
The final words about software estimation
The final words about software estimationThe final words about software estimation
The final words about software estimationAlberto Brandolini
 

Andere mochten auch (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
 

Mehr von Jef Claes

NCrafts Eventstorming workshop
NCrafts Eventstorming workshopNCrafts Eventstorming workshop
NCrafts Eventstorming workshopJef Claes
 
The Ubiquitous Language
The Ubiquitous LanguageThe Ubiquitous Language
The Ubiquitous LanguageJef Claes
 
Workshop event storming
Workshop event stormingWorkshop event storming
Workshop event stormingJef Claes
 
Refactoring towards the ubiquitous language
Refactoring towards the ubiquitous languageRefactoring towards the ubiquitous language
Refactoring towards the ubiquitous languageJef 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 FireJef Claes
 

Mehr von 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
 

Kürzlich hochgeladen

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
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 studentsHimanshiGarg82
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Kürzlich hochgeladen (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Evil By Design