This project is an attempt to implement solutions to the classic "99 Problems" in Go. This set of problems was initially developed for Prolog, and has since become a popular challenge, particularly for functional programming languages. Of course, most of them may be implemented in any language, and most attempts tackle 88 of the problems.
There are many statements of the problems, unless otherwise noted, I follow the examples in the Haskell wiki since they are particularly clear.
A running list of topics which I have explored in the process of writing these solutions:
- Go generic function signatures.
- Functional Go style which returns copies of slices instead of modifying in-place.
- Generic structs to approximate tuples and nested slices, neither of which are built-in to Go.
- The lack of a built-in
consoperator when building new slices is inconvenient. It must be worked around by initializing a new slice, appending the new head, and then using a spread to append the tail.