7. Composition Over
Inheritance
• Write functions that transform known input to known
output
• Output of one function is input to the next
• Things like LINQ
o Repeater.DataSource = myList.Where(x=> x.Length >
5).OrderBy(x=>x.Name);
8. Separate Functions From
Data
• But why wouldn’t you want possibly re-usable
functionality tightly bound to a specific data type?
9. Together Separate
• x.Method() • Method(x)
• Our brains probably • But what if we want to
prefer this way, nothing use it on y?
wrong with that • Method(y)
• Since C# is taking on • darn
some FP concepts
extension methods
semi-allow for this
11. F# isn’t just functional
• So I’m kind of wasting your time right?
• F# is multi-paradigm, but “functional first”
o Object Oriented – Smalltalk
o Functional – Lisp, Scala, Haskell, OCaml, etc.
o Imperative – C
• "I like to think of F# as a strongly typed python
for .net” – Don Syme, MS Research/Creator of F#