Question: Programming 3 0 . ( 8 pts ) In the space below, write a function called maxIncCount in OCam l F # , which :

Programming
30.(8 pts) In the space below, write a function called maxIncCount in OCamlF#, which :
Accepts a predicate function and a single list of integers. (You may assume the list has at least one element.)
Resolves to a integer count of the longest consecutive sequence of increasing integers matching the predicate.
The function should utilize pattern matching and recursion and not use any "mutable" values/variables.
For example, the result would equal 3 after the function call below:
let result = maxIncCount (fun xx>0
Reason: The 3 consecutive values 2;4;6 represent the longest run of integers greater than 0.
 Programming 30.(8 pts) In the space below, write a function called

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 Databases Questions!