Question: 1 point ) What would you put in place for the blank such that sublist [ 1 ] 0 = [ ] and sublist [

1 point) What would you put in place for the blank such that sublist [1]0=[] and
sublist [1; 0; 2; 3]1=[1; 0]?
l e t s u b l i s t l t =
f o l d _ r i g h t ( fun x a >____________________) l []
The implementation of fold_right is given for reference, below.
l e t r e c f o l d _ r i g h t f l a c c = match l with
|[]> a c c
| x : : x s > f x ( f o l d _ r i g h t f x s a c c )
(j)(1 point) What would you put in place for the blank such that the following program
returns (10.0,40.0)?
type t a x p a y e r =
| P e r s o n of f l o a t
| Company of f l o a t
l e t t a x y =
l e t i n c o m e _ t a x a x =__________ in
match y with
| P e r s o n i > i n c o m e _ t a x i 0.1
| Company j > i n c o m e _ t a x j 0.2 in
( t a x ( P e r s o n 100.0), t a x ( Company 200.0))
Tail Recursion

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!