Iker Alberts
Archaeologist
ICF
Kent Christian Academy
Asked question 07, Jun. 2023
The following functions each take predicate function and a list as input, and remove certain items from the list based on the predicate function. They each have this signature:

(a -> Bool) -> [a] -> [a]
a. ltrim removes all items from the start of the list that satisfy the predicate function.
b. rtrim removes all items from the end of the list that satisfy the predicate function.
c. trim removes all items from both the start and end of the list that satisfy the predicate function.

What's the solution?

  • Jun. 07, 2023
Asked question 06, Jun. 2023
What is “slice” in Golang?
  • Jun. 06, 2023