Haskell Programming Write a function mean :: Fractional a => [a] -> a, which determines the mean of a list. To do this
Posted: Mon Jul 11, 2022 9:49 am
Haskell ProgrammingWrite a function mean :: Fractional a => [a] -> a, which determines the mean of a list. To do this, first create a new list with map, which divides the elements of the input list by the length of the input list. Use the length funtion from haskell.Then use foldl to add the elements of the new list. you needno other higher-level functions for this except foldl and map.