Haskell one is wrong
is using the repl. And is not even printing a thing
Haskell would be Main = print "Hello world"
putStrLn would probably be better for this, so it doesn't display the quotes
Bug in the post ๐. Fixing it right now!
I'm not sure what it used to be, but this update isn't right. Here are two valid definitions: dev.to/spicydonuts/comment/ofod
This isn't valid file or repl syntax.
For the repl:
putStrLn "Hello world"
For a .hs file:
.hs
module Main where main = putStrLn "Hello world"
(function definitions are lower case, types and modules are capitalized)
We're a place where coders share, stay up-to-date and grow their careers.
Haskell one is wrong
is using the repl. And is not even printing a thing
Haskell would be Main = print "Hello world"
putStrLn would probably be better for this, so it doesn't display the quotes
Bug in the post ๐. Fixing it right now!
I'm not sure what it used to be, but this update isn't right. Here are two valid definitions: dev.to/spicydonuts/comment/ofod
This isn't valid file or repl syntax.
For the repl:
For a
.hsfile:(function definitions are lower case, types and modules are capitalized)