Answered step by step
Verified Expert Solution
Link Copied!

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.

  1. 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.
  2. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

Tennis balls used to be white. What is their color today, and why?

Answered: 1 week ago

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago