Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago