Hacker News new | ask | show | jobs
by yobbobandana 5337 days ago
I've tried to learn Haskell a couple times, and I keep running into the basic problem of not being able to search for info on terms like ">>=". If you don't know what it means, how do you find out? I certainly never knew until reading in this article that they were called "fish" operators. I previously tried to work through 3 or 4 different Haskell tutorials, and still didn't know this.

This article seems very helpful for simply enabling someone with Python experience to learn Haskell.

5 comments

Two very helpful tips:

1. Look at the types of higher order functions (remember, these operators arent magical syntax, just functions) in ghci with ":t (>>=)" for instance.

2. Use hoogle to find the docs for a function, view its implementation, or search for "that one function" by type

P.s. never heard that fish operator business.

They aren't actually called "fish" operators, as far as I know. ">>=" is pronounced "bind"; all the other ones are related. I didn't have this problem when learning Haskell because I just started by reading "Learn You a Haskell for Great Good"--which is a great book, coincidentally--and never had to google operators.
I only think of >=> as the fish operator, and it seems rarely used.
OK OK, "Bind and fish" operators. :-)
I actually rather like the name "fish operator". I just wanted to point out that Googling for that phrase wouldn't really work.
It's also called 'bind' and should be described in any monad tutorial. Hoogle is a great reference for using Haskell and can successfully find the 'fish' operators[1].

[1]http://www.haskell.org/hoogle/?hoogle=%3E%3E%3D