Earlier quoted context omitted.
`brew install haskell-platform` should help.
[deleted]
I got the expected output no issues.
11–20 of 42 posts
Earlier quoted context omitted.
`brew install haskell-platform` should help.
[deleted]
main = do
putStr "Hello World! Let's have a picnic! \n"
people_text > In Haskell, this type of integer can't get bigger than 2^31... It's platform-dependent h> finiteBitSize (0 :: Int) 64 > We could have used the type Integer instead- This type of integer grows "magically" and can hold any sized integer, no matter how big... but it's slower, so we used Int instead, since our numbers will never get that big. Premature optimisation at its best.
In Haskell you can also use the Integral typeclass to make functions polymorphic to Int and Integer.
Earlier quoted context omitted.
[deleted]
It doesn't seem to be outdated. I guess you probably didn't follow correctly the instructions (or maybe they aren't explained well). The extra code given in the second example goes just after the code in the first example, starting with the same indentation. Something like: main = do putStr "Hello World! Let's have a picnic! \n" people_text
> In Haskell, this type of integer can't get bigger than 2^31... It's platform-dependent h> finiteBitSize (0 :: Int) 64 > We could have used the type Integer instead- This type of integer grows "magically" and can hold any sized integer, no matter how big... but it's slower, so we used Int instead, since our numbers will never get that big. Premature optimisation at its best.
Wow, how did my Haskell tutorial get to the HN front page out of nowhere? :-) If you like my stuff, keep an eye out for my new Bitcoin book, which will be coming out this fall. I've been slaving over the artwork for months, it should be a beautiful book! The working title is "Bitcoins for the Befuddled".
I only wish someone would do a similar "Land of C" book some day :-)
Wow, how did my Haskell tutorial get to the HN front page out of nowhere? :-) If you like my stuff, keep an eye out for my new Bitcoin book, which will be coming out this fall. I've been slaving over the artwork for months, it should be a beautiful book! The working title is "Bitcoins for the Befuddled".
Earlier quoted context omitted.
In Haskell you can also use the Integral typeclass to make functions polymorphic to Int and Integer.
And why would you do this in simple tutorial program? Anyway, you'd need Num.