Sort 44 Discussions, By:
Please Login in order to post a comment
hello_world = putStrLn "Hello World"
main = do
It seems elixir is broken
looks broken to me aswell
Here are some useful Elixir templates for this HackerRank domain: https://www.hackerrank.com/challenges/fp-solve-me-first/forum/comments/619040
Hope you've been practicing Elixir, cheers!
It seems haskell is broken:
main = print "Hello World"
Your Output (stdout) "Hello World"
Expected Output Hello World
print -> putStrLn. You should not print ".
thanks! Than it would make sense to fix https://www.hackerrank.com/challenges/fp-solve-me-first and use putStrLn there as well, because it is confusing.
Hi @aindl, for string type putStrLn should be preferred. While for non-string types you need to convert it into a string and then use putStrLn on it, and print is doing that for us. Check the difinition of print
print = putStrLn. show
The valid syntax is:
main = do
putStrLn "Hello World"
in CLisp there are many ways you can print something on the console (http://www.lispworks.com/documentation/HyperSpec/Body/f_wr_pr.htm), for this challenge only some will work not sure why. Princ is one of them, write-line is another