By calling ‘:set –Wall’ at ghci prompt, you can enable warnings at GHCi prompt. Fact.hsfactorial :: Integer -> Integerfactorial n | n == 0 = 1 | n /= 0… Read More
Whenever an expression is evaluated at GHCi prompt, GHCi implicitly binds the value to the variable 'it'.Prelude> 1 + 2 * 37Prelude> it7Prelude> Prelude> "Hello" ++ "Worl… Read More
Lets start writing simple program, which calculates simple interest.Let Principal = P, Rate = R% per annum (p.a.) and Time = T years. Then, Simple Interest = (P x R x T)/100Step 1: Open… Read More
Step 1: Download Haskell from following location.https://www.haskell.org/platform/Step 2: Run the installer Step 3: You have to add the Haskell bin directory path to your sy… Read More