O'Reilly logo

Get Programming with F#: A guide for .NET developers by Isaac Abraham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 13. Achieving code reuse in F#

We’re going to change tack a little in this lesson, and look at using functions (and type inference) in F# to create lightweight code reuse, and to pass functionality (rather than data) through a system. If you’ve used the LINQ framework at all, much of this lesson will be familiar to you. We’ll cover

  • How we tend to achieve reuse in the OO world
  • A quick review of the core parts of LINQ
  • Implementing higher-order functions in F#
  • Dependencies as functions

We always look to reuse code in our applications, because copy-and-paste is evil—right? Unfortunately, you know as well as I do that reuse at a low cost is sometimes really hard to achieve! There are many types of code reuse that we strive to achieve; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required