DEV Community

Cover image for Relearn You a Haskell (Part 1: The Basics)

Relearn You a Haskell (Part 1: The Basics)

Andrew (he/him) on October 30, 2018

I worked my way through Learn You a Haskell for Great Good! about six months ago and I haven't worked much with Haskell since then. So of course I ...
Collapse
 
ben profile image
Ben Halpern

Great post, I really want to get into Haskell

Collapse
 
antonrich profile image
Anton

Have you tried Try Haskell?

Collapse
 
chenge profile image
chenge

This is great for new. I feel Haskell is more easy to remember after you understand the type syntax like :: => ->. This will help you write program more fluently.

A speaker told two break points: monad and category.

Collapse
 
awwsmm profile image
Andrew (he/him)

I missed this comment and just checked this out today... it's great! I'll have to keep this link for reference.

Collapse
 
ben profile image
Ben Halpern

Nope. This is great!

Collapse
 
antonrich profile image
Anton

I really like Haskell's repl because it allows you to learn types quickly.

You just type:

:t the_name_of_the_function.

:t - stands for :type.

Collapse
 
jvanbruegge profile image
Jan van Brügge

Just a minor nitpick, not is not a keyword, but a function

Collapse
 
awwsmm profile image
Andrew (he/him)

Fixed!

Collapse
 
antonrich profile image
Anton

not True -- comments come after two hyphens

instead of the bang operator (!==) it uses (/=) operator for not True in comparison.

Collapse
 
awwsmm profile image
Andrew (he/him)

Right! That's another idiosyncrasy of Haskell that I neglected to mention.

Collapse
 
joshcheek profile image
Josh Cheek

I'm fine with it. SQL's not-equal-to operator is <> things like that really don't matter. It's like being upset about single quotes vs double quotes. If you think that's annoying, then you should absolutely learn Haskell, because you're focused on aesthetics instead of big picture implications, and Haskell will force you to learn better ways of thinking about the big picture.

Most of the problems that most of us have are simply difficult and frowned upon in Haskell.

Thread Thread
 
awwsmm profile image
Andrew (he/him)

I think maybe you misunderstood what one of us said. All we did was note that the "not equals" operator is different than the "normal" one in Haskell. Which is a good thing to know whether you're focused on aesthetics or not.

Thread Thread
 
drbearhands profile image
DrBearhands

While I get what you're saying, the normal not-equal symbol is . So calling it an idiosyncrasy sounds like c-style bias, as Haskell's version is closer to the mathematical symbol.

Collapse
 
dwayne profile image
Dwayne Crooks

LYAH is a nice introduction to Haskell but if you're serious about understanding the language I'd recommend giving Haskell Programming from First Principles a read.

Just curious. Is there any particular application that you'd like to build in Haskell?

Collapse
 
deciduously profile image
Ben Lovy

Nice and concise! I'd completely forgotten about cycle

Collapse
 
aspittel profile image
Ali Spittel

Thank you so much for this, @joshcheek writes Haskell for some coding puzzles and I really want to learn it as a result!

Collapse
 
chenge profile image
chenge

Free Great Book: Learn You a Haskell

Collapse
 
chenge profile image
chenge • Edited

Good post, and another intro video.

Collapse
 
moopet profile image
Ben Sinclair

I worked my way through Learn you about six months ago and have also forgotten most of it!