Range Over Built in Idris
Here we use foreach
to sum the numbers in a list.
To run the program, save the code in a file (e.g., RangeOverBuiltInTypes.idr
), and use the Idris compiler to run it.
Now that we can iterate over built-in types in Idris, let’s learn more about the language.