Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started