Question: Please answer in SML / ML ! Also use map, foldl, or foldr functions and / or case expressions. Thank you! Write a function convert

Please answer in SML/ML! Also use map, foldl, or foldr functions and/or case expressions. Thank you!
Write a function convert of type ('a *'b) list -> 'a list *'b list, that converts a list of pairs into a pair of lists, preserving the order of the elements. For example, convert [(1,2),(3,4),(5,6)] should evaluate to ([1,3,5),(2,4,6]).

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!