SlideShare una empresa de Scribd logo
1 de 26
Keith Harrison
Why Hymans Use F#
Risk ModellingActuarial Consultancy
Pragmatic
public class Multiplier {
public int Factor;
public int Calculate(int value) {
return value * Factor;
}
}
var tenMultiplier = new Multiplier { Factor = 10 };
var result = tenMultiplier.Calculate(2);
let createMultiplier (factor) =
fun x -> x * factor
let multiplyByTen = createMultiplier(10)
let result = multiplyByTen(2)
let filter people =
let results = new List<Person>()
for person in people do
if person.Age > 30 then
results.Add(person)
results
let filter people age =
let results = new List<Person>()
for person in people do
if person.Age > age then
results.Add(person)
results
let filter people =
let results = new List<Person>()
for person in people do
if person.Sex = Sex.Male then
results.Add(person)
results
let filter filterFunction people =
let results = new List<Person>()
for person in people do
if filterFunction() then
results.Add(person)
results
let filter filterFunction people =
let results = new List<Person>()
for person in people do
if filterFunction() then
results.Add(person)
results
filter (fun p -> p.Age > 30) personList
filter (fun p -> p.Age > 40) personList
filter (fun p -> p.Sex = Sex.Male) personList
let isOver30 p = p.Age > 30
let isOver40 p = p.Age > 40
let isMale p = p.Sex = Sex.Male
filter isOver30 personList
filter isOver40 personList
filter isMale personList
filter isOver30 personList
personList |> filter isOver30
personList |> filter isOver30
|> filter isMale
Pragmatic
F#
Functional Imperative
Object
Oriented
Books
We’re Hiring
• www.hymans.co.uk/contact-us.aspx
• http://careers.stackoverflow.com/uk/company/hymans-robertson
• keith.Harrison@hymans.co.uk
• @KeithDHar
• http://www.linkedin.com/in/keithdharrison
Questions?

Más contenido relacionado

La actualidad más candente

Array matrix example programs - C language
Array matrix example programs - C languageArray matrix example programs - C language
Array matrix example programs - C languageSk_Group
 
Let’s Talk About Ruby
Let’s Talk About RubyLet’s Talk About Ruby
Let’s Talk About RubyIan Bishop
 
All You Need is Fold in the Key of C#
All You Need is Fold in the Key of C#All You Need is Fold in the Key of C#
All You Need is Fold in the Key of C#Mike Harris
 
Plot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onDr. Volkan OBAN
 
Applications of calculus in commerce and economics
Applications of calculus in commerce and economicsApplications of calculus in commerce and economics
Applications of calculus in commerce and economicssumanmathews
 
Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii sumanmathews
 
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout groupSelected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout groupJohn Kunze
 

La actualidad más candente (11)

Array matrix example programs - C language
Array matrix example programs - C languageArray matrix example programs - C language
Array matrix example programs - C language
 
Product rule
Product ruleProduct rule
Product rule
 
Let’s Talk About Ruby
Let’s Talk About RubyLet’s Talk About Ruby
Let’s Talk About Ruby
 
All You Need is Fold in the Key of C#
All You Need is Fold in the Key of C#All You Need is Fold in the Key of C#
All You Need is Fold in the Key of C#
 
Numpy python cheat_sheet
Numpy python cheat_sheetNumpy python cheat_sheet
Numpy python cheat_sheet
 
Plot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,on
 
Applications of calculus in commerce and economics
Applications of calculus in commerce and economicsApplications of calculus in commerce and economics
Applications of calculus in commerce and economics
 
Excel
ExcelExcel
Excel
 
Ooprc4 b
Ooprc4 bOoprc4 b
Ooprc4 b
 
Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii
 
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout groupSelected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
 

Destacado

Why Should I Keep My Landline?
Why Should I Keep My Landline?Why Should I Keep My Landline?
Why Should I Keep My Landline?LCRTelecom
 
In what ways does your media product use, develop or chalenge forms and conv...
 In what ways does your media product use, develop or chalenge forms and conv... In what ways does your media product use, develop or chalenge forms and conv...
In what ways does your media product use, develop or chalenge forms and conv...Rosielw
 
IPR INTENSIVE INDUSTRIES ppt
IPR INTENSIVE INDUSTRIES pptIPR INTENSIVE INDUSTRIES ppt
IPR INTENSIVE INDUSTRIES pptOAMICS
 
Title analysis
Title analysisTitle analysis
Title analysisRosielw
 
Rencana pelaksanaan pembelajara1
Rencana pelaksanaan pembelajara1Rencana pelaksanaan pembelajara1
Rencana pelaksanaan pembelajara1Dewi Ratnasari
 
Kc coordination presentation
Kc coordination presentationKc coordination presentation
Kc coordination presentationOAMICS
 

Destacado (9)

Why Should I Keep My Landline?
Why Should I Keep My Landline?Why Should I Keep My Landline?
Why Should I Keep My Landline?
 
In what ways does your media product use, develop or chalenge forms and conv...
 In what ways does your media product use, develop or chalenge forms and conv... In what ways does your media product use, develop or chalenge forms and conv...
In what ways does your media product use, develop or chalenge forms and conv...
 
IPR INTENSIVE INDUSTRIES ppt
IPR INTENSIVE INDUSTRIES pptIPR INTENSIVE INDUSTRIES ppt
IPR INTENSIVE INDUSTRIES ppt
 
Deberes y talleres de sociologia
Deberes y talleres de sociologia Deberes y talleres de sociologia
Deberes y talleres de sociologia
 
Ptea tutorial
Ptea tutorialPtea tutorial
Ptea tutorial
 
Title analysis
Title analysisTitle analysis
Title analysis
 
Rencana pelaksanaan pembelajara1
Rencana pelaksanaan pembelajara1Rencana pelaksanaan pembelajara1
Rencana pelaksanaan pembelajara1
 
Kc coordination presentation
Kc coordination presentationKc coordination presentation
Kc coordination presentation
 
Trabajo autonomo
Trabajo autonomoTrabajo autonomo
Trabajo autonomo
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Why Hymans Use F#

Notas del editor

  1. I’m keithharrisonI’m a .Net Developer at Hymans RobertsonHere to talk about why Hymans use F#
  2. Start with a bit of back groundWho are Hymans?Actuarial Consultancy FirmModel risk using complex mathematical modelsFor example in a pension scheme calculate how much money you need today to pay each member till the last one dies. Mortality, pay rises, how long each member stay with the company
  3. Problem?Port legacy excel application to .NetInteroperation with other systemsUnit Testing
  4. What problem does F# solve with F#?Familiar to someone with a maths backgroundLeverage maths skills
  5. Compose maths formulas to solve different problemsCalculation such as mortality, discounting cashflows are used to solve lots of different problems.
  6. How is F# familiar to people with a strong maths background?
  7. C# code.You need to understand, classes, access modifiers, scope, constructors, object initialisers
  8. Same solution in F#Explain F# syntax‘let’ names a value or a functionStrongly typed, Types are inferredClosure
  9. Explaincomposibility
  10. What if we wanted to filter people over 40?
  11. Add age variableWhat if we wanted to filter Men?
  12. Same as previous functions except if statement
  13. Same as previous functions except if statement
  14. Multi - paradigm
  15. ConclusionPorted legacy system to F#Quickly train up actuaries to expand the teamReuse the math functionsPragmatic convert imperative to F# -&gt; function and use power of .Net framework