learn_haskell/00_preamble.lhs

50 lines
2.1 KiB
Text
Raw Normal View History

2012-02-09 16:25:00 +00:00
begindiv(intro)
2012-02-28 16:16:48 +00:00
Bend his mind to Haskell can be hard.
It was for me.
2012-03-29 15:37:19 +00:00
In this article I try to provide what I lacked when I started to learn Haskell.
2012-02-07 17:37:36 +00:00
2012-03-30 16:49:01 +00:00
As Boromir would say: "One does not simply learn Haskell".
2012-03-30 17:20:04 +00:00
To learn Haskell you'll need to learn far more than just a new language.
Haskell use a lot of concepts I've never heard about before.
But many will be useful for programming even in other languages.
2012-02-07 17:37:36 +00:00
2012-03-30 16:49:01 +00:00
The article will certainly be hard to follow.
2012-03-29 15:37:19 +00:00
This is done on purpose.
There is no shortcut to learn Haskell.
2012-03-30 16:49:01 +00:00
It is hard and challenging.
2012-04-01 22:14:41 +00:00
But I believe it is a good thing.
2012-03-30 16:49:01 +00:00
This article can be seen as a very dense introduction to Haskell.
The conventional way to learn Haskell is to read two books.
First ["Learn You a Haskell"](http://learnyouahaskell.com) and just after ["Real World Haskell"](http://www.realworldhaskell.org).
I also believe this is the right way to go.
But Haskell is very hard to learn by skimming these books.
You'll have to read them in detail.
2012-03-30 17:20:04 +00:00
This is why I believe such an article while difficult to read can be a very good introduction.
Furthermore, I believe I missed such an article while learning Haskell.
2012-02-24 15:57:19 +00:00
2012-03-30 17:20:04 +00:00
This actual (long) article contains four parts:
2012-02-24 15:57:19 +00:00
2012-02-28 17:04:19 +00:00
- Introduction: a fast short example to show Haskell can be friendly.
- Basic Haskell: Haskell syntax, and some essential notions.
2012-03-15 14:44:09 +00:00
- Hard Difficulty Part:
2012-03-29 15:37:19 +00:00
- Functional style; an example from imperative to functional style
- Types; types and a standard binary tree example
2012-03-22 15:54:06 +00:00
- Infinite Structure; manipulate an infinite binary tree!
2012-03-15 14:44:09 +00:00
- Hell Difficulty Part:
2012-03-29 15:37:19 +00:00
- Deal with IO; A very minimal example
2012-03-22 15:54:06 +00:00
- IO trick explained; the hidden detail I lacked to understand IO
2012-02-28 15:55:41 +00:00
- Monads; incredible how we can generalize
2012-03-29 15:37:19 +00:00
- More on infinite tree; a discussion on infinite tree manipulation.
2012-02-24 15:57:19 +00:00
> Note: Each time you'll see a separator with a filename ending in `.lhs`, you could click the filename to get this file. If you save the file as `filename.lhs`, you can run it with
> <pre>
> runhaskell filename.lhs
> </pre>
2012-02-29 21:55:39 +00:00
>
> Some might not work, but most will.
> You should see a link just below.
2012-02-09 16:25:00 +00:00
enddiv