SlideShare une entreprise Scribd logo
1  sur  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?

Contenu connexe

Tendances

Let’s Talk About Ruby
Let’s Talk About RubyLet’s Talk About Ruby
Let’s Talk About Ruby
Ian Bishop
 
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
John Kunze
 

Tendances (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
 

En vedette (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
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Why Hymans Use F#

Notes de l'éditeur

  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