O'Reilly logo

Seven Languages in Seven Weeks by Bruce A. Tate

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

Day 1: Logical

Like Spock, you’ll find that Haskell’s core concepts are easy to grasp. You’ll work strictly with defining functions. Given the same input parameters, you’ll get the same output parameters, every time. I’m going to use GHC, or the Glasgow Haskell Compiler, version 6.12.1. It’s widely available across many platforms, but you can find other implementations as well. As always, I’m going to start in the console. Type ghci:

 
GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help
 
Loading package ghc-prim ... linking ... done.
 
Loading package integer-gmp ... linking ... done.
 
Loading package base ... linking ... done.
 
Loading package ffi-1.0 ... linking ... done.

You’ll see Haskell load a few packages, and then you’re ready ...

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