about | help | code help+videos | done | prefs |
Write a function remove(data, value) that returns a new list that contains the same elements as the list data except for ones that equal value. Note that, unlike the built-in remove method, your function should remove ALL items equal to value. For example, remove([3, 1, 5, 3, 9], 3) should return the list [1, 5, 9]. remove_better([1, 1, 1, 1, 1, 1, 1, 1, 1], 1) → [] remove_better([1, 2, 3, 4, 5, 6, 10, 8, 9], 1) → [2, 3, 4, 5, 6, 10, 8, 9] remove_better([3, 2, 3, 4, 5, 3, 10, 3, 9], 3) → [2, 4, 5, 10, 9] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy