A Cats Effect ChatProxy example

As a note to self, there are some nice examples in this Cats-Effect example, including how to use collect with a case statement.

As I’ve written with Scala case statements used as a function literal or anonymous function before, one thing to notice is that inside the curly braces he uses a case statement. Many moons ago I saw an Artima document that stated, “a sequence of cases in curly braces can be used anywhere a function literal can be used.” So that code inside the curly braces is just a function (or anonymous function, also known as a function literal).