The New Haskell Homepage
I get paid to write C++ code. I'm pretty good at it. I understand it's normal usage syntax very well. I don't fucking know what a god damn thing means in Haskell.<p>λ 5 + 7
12 :: Num a => a<p>What the christ? The 12 I get. Got it. The colons? Not sure. I think it's just a dumb separator. Num is type! What the hell is a => a? I have no idea.<p>In the top they have an example.<p>primes = sieve[2..]
    where sieve (p:xs) =
      p : sieve [x | x <- xs, x `mod` p /= 0]<p>Jesus. Where to begin? First of all I had to consult a dictionary for sieve. I guess primes is a thing (function?) that takes 2 or more things? Not sure. Not sure what 'where' means in this context. Don't have a good guess. Have absolutely no fucking clue what "p:xs" means. Also no idea what "p : sieve" means. I am equally stumped as to what "[x | x <- xs," means. The "x 'mod' p" I can guess! The /= 0 I'm not sure. Maybe "/=" is equivalent to "!=" ?<p>And here's the thing. I've tried to read a dozen or so tutorials on Haskell and I give up every time because the syntax isn't explain. Please, please for the love god just tell me what your abstract symbols represent!<p>Edit: <a href="http://learnyouahaskell.com/" rel="nofollow">http://learnyouahaskell.com/</a> Reading that now. So far it's pretty good.