Question: ** THIS IS A TASK IN ERLANG PROGRAMMING LANGUAGE. Write an Erlang function named count that takes two parameters, an item, and a list. The
** THIS IS A TASK IN ERLANG PROGRAMMING LANGUAGE.
- Write an Erlang function named count that takes two parameters, an item, and a list. The function should return the number of times that the item occurs in the list. For example, count( 3, [1,3,5,2,3,7,4,1] ) should return 2. Do not use any built-in functions in Erlang.
- Write an Erlang function named remove_all that takes two parameters, an item and a list. The function should return a list with all instances of item removed. For example, remove_all( 3, [1,3,5,2,3,7,4,1] ) should return [1,5,2,7,4,1].
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
