Question: Write a function in Erlang called func that takes a list of tuples and returns a new list consisting of tuples from the original list,

Write a function in Erlang called func that takes a list of tuples and returns a new list consisting of tuples from the original list, for which the first tuple element is smaller than the second one (each tuple in the incoming list consists of only two elements).

For example, if func( [ {1, 2}, {4, 4}, {9, 10} ] ) is called, it returns [ {1, 2}, {9, 10} ]. Do NOT use any list library functions or list comprehension while solving this.

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!