IntelliFactory / F# Programming I

Please RSVP for instructions on how to join the event.

Description

This course covers the basics of F# and functional programming.

What you will learn

 

  • What is F# and why it matters.
  • How F# increases productivity.
  • How F# catches more bugs at compile time.
  • How to do general purpose programing in F#.
  • How to leverage the best of F#'s paradigms:
    • functional
    • object oriented
    • imperative
    • event driven
  • How to rapidly prototype in F#.

 

Outline

  1. F#'s predecessors
    • λ-calculus
    • LISP
    • ML
      • Caml
      • OCaml
  2. λ-calculus
    • Immutability
    • Lazy
    • Currying
    • Higher-order functions
  3. Static Typing
    • Static vs. dynamic typing
    • Compile time vs. run time
  4. Visual Studio
    • Creating an F# project
    • Building
    • Referencing DLLs
    • FSI
  5. Types
    • It's not just results that are typed
    • It also matters "how you got there"
      • The following integer types are different:
        • int
        • int -> int -> int
        • (int * int) -> int
  6. Tuples
    • 1st class argument lists
    • Multiple return values
    • Product types
  7. Type inference
    • Annotations
    • Overloading
      • Ad hoc polymorphism
      • Same name
        • Different algorithms for different types
    • Generics
      • Parametric polymorphism
        • Same algorithm for different types
  8. Discriminated unions
    • Type option
    • Unions vs. inheritance
  9. Pattern matching
    • Destructuring bind
    • Subsumes if
  10. Records
    • Named elements
    • Lightweight OOP system
      • Type augmentations
      • Records + unions vs. inheritance
  11. Immutability
    • Definition of functional
      • SSA
    • Thread safe
    • Mutation
      • Opt in
      • Immutability is the default
  12. Functional Programming
    • Values
      • No, everything is not an object
      • Everything is a value
    • 1st class citizens
      • All citizens can participate equally in all activities sanctioned by the language
    • Higher-order functions
      • Closures
    • Recursion
  13. Recursion
    • Tail vs. non-tail
      • Trees
      • Continuations
    • Can use recursion for everything
    • Library functions
      • encapsulate functional idioms
      • more declarative
      • highly optimized
  14. Lists
    • Cons
    • Append
    • Pattern matching
    • Recursion
    • Easy conversion to other data types
      • To array
  15. Composition
    • Partial application
    • Piping
      • let (|>) x f = f x
    • <<
    • >>
  16. Mutation
    • Via annotation
      • Can't escape scope
    • Reference cells
    • Can improve performance
    • Some data structures are imperative
      • arrays
  17. Packaging
    • Modules
      • Allow values
    • Namespaces
      • Only types
    • Neither works in FSI
  18. Exceptions
    • Errors
      • Can be encoded in unions
      • Rather than thrown
    • Tools:
      • try.with
      • finally
      • using
    • Debugging
  19. Library Functions
    • Common functional idioms
      • Map
      • Fold
      • Etc.
  20. Seq
    • IEnumeration
    • Demand driven
      • Not memoized
    • LINQ
  21. Classes
    • Can be immutable
    • .Net compatible
    • Casting
      • Up
      • Down
    • Flexible types

Upcoming events

No events

You must be logged in to book an onsite training.

Please use the login link on the top right.

IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper