Haskell is a purely functional, lazy, statically-typed programming language with type inference.

Functional means that functions are first-class data types.

Purely Functional means (roughly) that there are no side effects. Every function will always return the same value for a given argument will do nothing else.

Lazy (a.k.a "non-strict") means that the compiler will put off evaluating a thing until absolutely neccessary. This lets you safely do weird stuff like operating on an infinite list--the language will only create it up to the last value you actually use.

Statically-typed means that identifiers have a type set at compile time--like those in Java, C++ or C#--instead of holding data of any type like those in Python, Ruby or JavaScript.

Type inference means that the compiler will often figure out the type of an identifier by itself so you don't have to specify it. Scala and later versions of C# both do this.

Haskell syntax is beautiful and minimal. For example, here is an implemention of quicksort in 6 lines:

1
2
3
4
5
6
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
    let smallerSorted = quicksort [a | a <- xs, a <= x]
        biggerSorted  = quicksort [a | a <- xs, a > x]
    in  smallerSorted ++ [x] ++ biggerSorted

(source)

In addition, Haskell is standardized and has multiple high-quality implementations, some of which produce standalone native binaries. There is also a collection of free third-party libraries available and a package manager ("cabal") to automatically fetch them for you.


Help us explain this better! File a GitHub issue at https://github.com/exercism/xhaskell/issues if you have suggestions, or submit a patch with improvements to the https://github.com/exercism/xhaskell/blob/master/docs/ABOUT.md file.

Try It!

If you've downloaded the command-line client and have Haskell installed on your machine, then go ahead and fetch the first problem.

1
exercism fetch haskell

In order to be able to submit your solution, you'll need to configure the client with your Exercism API key.

1
exercism configure --key=YOUR_EXERCISM_KEY

When you've written a solution, submit it to the site. You'll have to configure the command-line client with your exercism API key before you can submit.

1
exercism submit PATH_TO_FILE