• All of your F# code should be purely functional. You should not make any use o
ID: 3894235 • Letter: #
Question
• All of your F# code should be purely functional. You should not make any use of mutable variables, loops, etc.;
• Do not use built-in F# functions other than the ones discussed in class;
• Pay attention to the types that F# infers for your functions! They are very informative;
• Put comments in your code as appropriate;
• You may define auxiliary functions to help in solving some of the problems, but you should try to use them only when necessary.
Write an F# program removedup x that removes duplicated elements in list x (hint: use find function). For example, > removedup [1;2;1;3;2;4;4;5;7;6;7;5];; val it : int list = [1; 3; 2; 4; 6; 7; 5]
Explanation / Answer
Sample Run:
[1; 2; 3; 4; 5; 7; 6]
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.