Question: Implement a function that mimics built-in map function in SML. Apply foldr, foldl, and map to solve some problem with a single line of code.

Implement a function that mimics built-in map function in SML.

Apply foldr, foldl, and map to solve some problem with a single line of code.

3. Write a function named ordlist of type char list -> int list that take a list of characters and returns the list of integer codes of those characters. For example, if you evaluate ordlist [#A, #b, #C] you should get [65, 98, 67]. (Refer to Exercise 2 on page 144.)

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!