Question: Using Haskell answer below; Suppose a program has read in a list of numbers of type Int. Each number is intended to represent a Boolean
Using Haskell answer below;
Suppose a program has read in a list of numbers of type Int. Each number is intended to represent a Boolean value, where 0 means False, 1 means True, and any other number constitutes invalid input. Write a function convert :: Int -> Bool that converts a number to the corresponding Boolean. Then use map to user convert to convert a list of integers to bools.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
