Answered step by step
Verified Expert Solution
Question
1 Approved Answer
** 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started