We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Yes, hello_worlds 1 = putStrLn "Hello World" is pattern matching. When the hello_words function is called with input 1, that is the executed line. However, in Haskell, the base of recursions are often expressed with a pattern match, so I think is fair to also say it's a stop condition.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hello World N Times
You are viewing a single comment's thread. Return to all comments →
Yes,
hello_worlds 1 = putStrLn "Hello World"
is pattern matching. When thehello_words
function is called with input 1, that is the executed line. However, in Haskell, the base of recursions are often expressed with a pattern match, so I think is fair to also say it's a stop condition.