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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!