ML programming language
Posts  1 - 1  of  1
kaveh
• Only basic functional facilities of selected environments are allowed to be used. All needed functions and data structures should be implemented.
• Document on design and working state of delivered programs should be attached.
• Consider all possible situations and discuss them even if not considered in implementation. For example all possible cases for input parameters such as NULL should be taking into account.
1. Write a function with three parameters, two atoms and a list, (say p1, p2 and L) that returns the list, L, with all occurrences of the first given atom, p1, replaced by the second one, p2. If P2 be nil, the given atom should be deleted and the returned list cannot contain anything in place of it, no matter how deep it occurred in the list.
Save
Cancel
Reply
 
x
OK