Goals
- Read the article about functional programming Функциональный Swift.
- Write in your own words what Pure Function is.
- Sort the array of numbers in ascending order using the Sorted function.
- Convert an array of numbers to an array of strings using the Map function.
- Use the Reduce function to convert an array of strings with people's names into a single string containing all of these names.
- Write a function that accepts a function with the type (Void) - > Void, which will be called with a delay of two seconds.
- Write a function that accepts two functions and returns a function that, when called, executes the first two functions.
- Write a function that sorts the array according to the passed algorithm: it takes an array of numbers and a function that takes two numbers as input, returns
- Bool (whether the first number should go after the second), and returns an array sorted according to this algorithm.
- Write in your own words what infix -, suffix -, prefix-operators are.
🔗 Main point
Implemented a collection with pure functions. When you click on a collection cell, the corresponding clean function is called
- Implementing pure functions
- Table view collections and custom xib cell
- Navigation stack transitions
- Pure functions autotests