Question: code in ML 2.2.9 Suppose ML did not have a cat operation. Imple- ment it yourself by writing a function cat that takes two lists

code in ML
code in ML 2.2.9 Suppose ML did not have a cat operation.
Imple- ment it yourself by writing a function cat that takes two

2.2.9 Suppose ML did not have a cat operation. Imple- ment it yourself by writing a function cat that takes two lists and returns their concatenation, using only cons. (Hint: Use pattern-matching only on one parameter, say, the first. What is cat([. xx)?) 1. (3 points) [DMFP] Exercise 2.2.9 (Implement the list append or list concatenation operator @ using only the cons :: operator.) - (op @); val it = fn ; 'a list * 'a list -> 'a list cat; val it = fn ; 'a list fn : 'a list * 'a list -> 'a list = Do not give more then 2 lines of code

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!