Question: q7, q10, q11 using ML Language program Exercise 7 Writea function bor of type bool list -> bool that takes a list of boolean values

Exercise 7 Writea function bor of type bool list -> bool that

q7, q10, q11 using ML Language program

Exercise 7 Writea function bor of type bool list -> bool that takes a list of boolean values and returns the logical OR of all of them. If the list is empty, your function should return false. Exercise 8 Write a function band of type bool I ist -> bool that takes a list of boolean values and returns the logical AND of all of them. If the list is empty, your function should return true. Exercise 9 Write a function bxor of type bool list -> bool that takes a list of boolean values and returns the logical exclusive OR of all of them. (It should return true if the number of true values in the list is odd and false if the number of true values is even.) If the list is empty, your function should return fal se. Exercise 10 Write a function dupList of type' a list 'a list whose output list is the same as the input list, but with each element of the input list repeated twice in a row. For example, if the input list is [1, 3, 2], the output list should be [I, I, 3, 3, 2, 2]. If the input list is [], the output list should be [1. Exercise Il Write a function mylength of type ' a list -> int that returns the length of a list. (Of course, you may not use the predefined length function to do it.) Fxercise 12 Write a function i12absr1 of type int list ->real list that takes a list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!