13. HC13 ‐ Haskell Chapter 13 Practical Tasks: Modules - wimsio/universities GitHub Wiki
-
HC13T1
Create a program that lists all files in the current directory using theSystem.Directory
module. -
HC13T2
Write a function that filters files in the current directory based on a substring in the filename usingData.List.isInfixOf
. -
HC13T3
Implement a function that sorts and returns filtered file names from the current directory using bothData.List.sort
andData.List.filter
. -
HC13T4
Write a Haskell module namedSumNonEmpty
that defines a functionsumNonEmpty
, which returns an error if called on an empty list. -
HC13T5
Refactor thesumNonEmpty
function to restrict the visibility of helper functions like error messages in the module export list. -
HC13T6
Create a function that usesData.Map
to convert a list of filtered file names into a key-value map. -
HC13T7
Write a program that imports a function from your customSumNonEmpty
module and calculates the sum of a list of numbers. -
HC13T8
Demonstrate how to handle name conflicts between two imported modules, using qualified imports. -
HC13T9
Create a function that demonstrates renaming a module namespace and uses functions from both renamed modules. -
HC13T10
Create a main function that imports and calls functions from at least two modules (System.Directory
,Data.List
) to perform a search and display sorted file results.