Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write code in haskell. thank you 3. List Operations Please define the following functions in Haskell. Please write your own code rather than using the

image text in transcribedwrite code in haskell. thank you
3. List Operations Please define the following functions in Haskell. Please write your own code rather than using the list functions pre-defined by Haskell. (a) Function zipi takes two lists as input and zips them together to produce a list of pairs. If the two list are not of the same length, the resultant list is of the length of the shorter one. Example: zipi (1,2,3,4) (2,3,4] - [(1,2).(2,3).(3,4)} (b) Function zip2 takes two lists as input and zip them together to produce a list of pairs. If the two list are not of the same length, the resultant list is of the length of the longer one, und duplicate the elements in the longer list when the shorter one runs out. Example: zip2 [1,2,3,6] [2,3,4) [(1,2), (2,3), (3,4),(6,6)]

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions