SlideShare une entreprise Scribd logo
1  sur  9
Some F# Highlights Matt Harrington mbh.work@gmail.com
Dealing With Concurrency Hire an expert, or … Software Transactional Memory, or … Functional Programming. -Unknown
Free, as in beer Free standalone compiler for .NET (Windows or Mono). Syntax highlighting for TextMate, vim, emacs, TextPad, jedit, and others. IDEs: MonoDevelop SharpDevelop Visual Studio Shell Microsoft Research Shared Source License
Robin Milner University of Edinburgh ML – 1970s Don Syme MSR Cambridge F# - 2002 Xavier Leroy, et al. INRIA, France Ocaml - 1996
FP ,[object Object]
Asynchronous programming
Pipeline operator |>
Currying

Contenu connexe

Tendances

2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
AAKASH KUMAR
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
AAKASH KUMAR
 
Specialization of Generics Array Accesses After Inlining
Specialization of Generics Array Accesses After InliningSpecialization of Generics Array Accesses After Inlining
Specialization of Generics Array Accesses After Inlining
nomaddo
 
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
Rishikesh Agrawani
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
hassaanciit
 

Tendances (19)

Exp 3
Exp 3Exp 3
Exp 3
 
data mining training in Bangalore
data mining training in Bangaloredata mining training in Bangalore
data mining training in Bangalore
 
vlsi training in chandigarh
vlsi training in chandigarhvlsi training in chandigarh
vlsi training in chandigarh
 
Functions
FunctionsFunctions
Functions
 
Cyclcone a safe dialect of C
Cyclcone a safe dialect of CCyclcone a safe dialect of C
Cyclcone a safe dialect of C
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
Dynamic allocation
Dynamic allocationDynamic allocation
Dynamic allocation
 
User Defined Functions in MATLAB part 2
User Defined Functions in MATLAB part 2User Defined Functions in MATLAB part 2
User Defined Functions in MATLAB part 2
 
functions in C
functions in Cfunctions in C
functions in C
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
 
Matlab Nn Intro
Matlab Nn IntroMatlab Nn Intro
Matlab Nn Intro
 
Specialization of Generics Array Accesses After Inlining
Specialization of Generics Array Accesses After InliningSpecialization of Generics Array Accesses After Inlining
Specialization of Generics Array Accesses After Inlining
 
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
C++ Templates_ Program to Swap Two Numbers Using Function Template - The Craz...
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
 
Loop Statements [5] M
Loop Statements [5] MLoop Statements [5] M
Loop Statements [5] M
 
Brief introduction to Algorithm analysis
Brief introduction to Algorithm analysis Brief introduction to Algorithm analysis
Brief introduction to Algorithm analysis
 

En vedette (6)

إلى من أدركت رمضان
إلى من أدركت رمضانإلى من أدركت رمضان
إلى من أدركت رمضان
 
Win a Landice Treadmill with Facebook Photo Contest
Win a Landice Treadmill with Facebook Photo ContestWin a Landice Treadmill with Facebook Photo Contest
Win a Landice Treadmill with Facebook Photo Contest
 
Highlights of F# lightning talk
Highlights of F# lightning talkHighlights of F# lightning talk
Highlights of F# lightning talk
 
Worst Database Practices
Worst Database PracticesWorst Database Practices
Worst Database Practices
 
Intro to Social Media
Intro to Social MediaIntro to Social Media
Intro to Social Media
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibility
 

Similaire à Fsharp shdh 40 lightning talk

How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1
Taisuke Oe
 

Similaire à Fsharp shdh 40 lightning talk (20)

Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
RIO Application Programming
RIO  Application ProgrammingRIO  Application Programming
RIO Application Programming
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
Handout2.pdf
Handout2.pdfHandout2.pdf
Handout2.pdf
 
Introduction to Elixir
Introduction to ElixirIntroduction to Elixir
Introduction to Elixir
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
C programming part2
C programming part2C programming part2
C programming part2
 
C programming part2
C programming part2C programming part2
C programming part2
 
C programming part2
C programming part2C programming part2
C programming part2
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1
 

Fsharp shdh 40 lightning talk

  • 1. Some F# Highlights Matt Harrington mbh.work@gmail.com
  • 2. Dealing With Concurrency Hire an expert, or … Software Transactional Memory, or … Functional Programming. -Unknown
  • 3. Free, as in beer Free standalone compiler for .NET (Windows or Mono). Syntax highlighting for TextMate, vim, emacs, TextPad, jedit, and others. IDEs: MonoDevelop SharpDevelop Visual Studio Shell Microsoft Research Shared Source License
  • 4. Robin Milner University of Edinburgh ML – 1970s Don Syme MSR Cambridge F# - 2002 Xavier Leroy, et al. INRIA, France Ocaml - 1996
  • 5.
  • 6.
  • 11. MemoizationFirst class functions Immutability Recursion Type inference Pattern matching Lists, sequences, tuples, records, discriminated unions Optiontype
  • 12. OO Classes Inheritance Interfaces Structs Properties Delegates Enums Mutability
  • 13. Tail Call Optimization .method public static int32 g(int32 x) cil managed { .maxstack 5 L_0000: nop L_0001: ldarg.0 L_0002: ldc.i4.0 L_0003: ble.s L_0007 L_0005: br.s L_0009 L_0007: br.s L_0019 L_0009: newobj instance void Program/g@9::.ctor() L_000e: ldarg.0 L_000f: ldc.i4.1 L_0010: sub L_0011: tail L_0013: call int32 Program::f(class [FSharp.Core]Microsoft.<snip>) L_0018: ret L_0019: ldarg.0 L_001a: ret }
  • 14. Units of Measure [<Measure>] type kilogram letbowlingBall = 7.26<kilogram> let force (mass: float<kilogram>) = mass * 9.8
  • 15. Pipeline operator let numbers = [1 .. 100] let square x = x * x letsumOfSquares = numbers |> List.mapsquare |> List.sum
  • 16. Euler Problem #7 let isPrimenum = letupperDivisor = int32(sqrt(float num)) matchnumwith | 0 | 1 -> false | 2 -> true | n ->seq { 2 .. upperDivisor } |> Seq.forall(fun x ->num % x <> 0) let primes = Seq.initInfinite id |> Seq.filterisPrime let nthPrime n = Seq.nth n primes printfn "The 10001st prime number is %i." (nthPrime 10001) Code from "Juliet" on StackOverflow.
  • 17. More… Matt Harrington: mbh.work@gmail.com SFsharp.org Luca Bolognese’s video (see links on SFsharp.org) Programming F# by Chris Smith