O'Reilly logo

Get Programming with Haskell by Will Kurt

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 11. Type basics

After reading lesson 11, you’ll be able to

  • Understand basic types in Haskell, including Int, String, and Double
  • Read type signatures for functions
  • Use simple type variables

This lesson introduces one of the most powerful aspects of Haskell: its robust type system. The fundamentals of functional programming covered in the preceding lessons are shared by all functional programming languages from Lisp to Scala. It’s Haskell’s type system that sets it apart from other programming languages. Our introduction in this lesson starts with the basics of Haskell’s type system.

Consider this

You need to create a simple function for taking the average of a list of numbers. The most obvious solution is to take the sum ...

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