Exercise 2 : Basic Number Filtering
Exercise: Solve this problem in Go. Write code and test cases too.
Labels: Beginner
Time to complete: 1 day
What will you learn
How to write unit test cases.
How to design small functions for specific use cases.
Code reuse: reusing
evenandoddfunctions in Stories 4, 5 and 6, reusing various functions in stories 7 and 8.
How to compose multiple functions together? How to form a chain of functions?
Identify abstractions using higher order functions (functions that accept or return functions). i.e. using functions as first-class citizens.
Understand Go’s generics and whether and how these can be used to write generic methods that can operate on any type.
How to evaluate your solution:
Actual Solution: