Question: Ak 3 (Haskell: list manipulation, [11p] ). (a) Write a function multi which, given a list of pairs of a positive integer and a character,
![Ak 3 (Haskell: list manipulation, [11p] ). (a) Write a function](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f06487e93_35666f4f0642bcdb.jpg)
Ak 3 (Haskell: list manipulation, [11p] ). (a) Write a function multi which, given a list of pairs of a positive integer and a character, generates a string that consists of space-separated blocks of repetitions of individual characters as indicated by the given pairs. For example, multi [(2,b ' ),(1,a ' ),(4,c)]=="bb a cccc " should hold. You may use known list functionality of Haskell (including libraries). (b) Which concrete lists are computed by the following expressions? (c) Replace the following list comprehension by an equivalent expression making use of map and filter (=p foldr (xxs if px then x:xs else xs) [1). yyy[1400],ymod9=0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
