Range Over Built in Haskell
Here we use range
to sum the numbers in a slice. Arrays work like this too.
To run the program, save the code in a file called Main.hs
and use runhaskell
to execute it.
Now that we can run and build basic Haskell programs, let’s learn more about the language.