Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Functions should be made using haskell 1. Write a function maxList :: [Integer] -> Integer which returns the maxi- mum element of a list. 2.

image text in transcribed

Functions should be made using haskell

1. Write a function maxList :: [Integer] -> Integer which returns the maxi- mum element of a list. 2. Write a function multiplyList :: [Integer] -> Integer which multiplies to- gether all the elements of a list. What should be the base case value when the list is empty? 3. Write a function existsOdd :: [Integer] -> Bool which returns True if there exists an odd element in the list, and returns False otherwise. 4. Write a function findOdd :: [Integer] -> Maybe Integer which returns Just x if there is some x in the input that is odd, and returns Nothing otherwise. 5. Write a function removeEmpty :: [String] -> [String] which takes a list of strings and removes all empty strings from the list. removeEmpty ["Hello", "", "there", "", " "world",""] ["Hello", "there","world"]

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions