I'm working on a WASM clone of the original Castle Wolfenstein. I'm going to call it Castle WASMstein.
Please keep posting updates about this because if I could instantly fire up a game in my browser, I would definitely pay for that and play with it all day!
I am suggesting this since you said you want to better understand functional programming. Category Theory, as mathematicians look at it, is an extremely abstract field. If you want to do pure math related stuff in Category Theory, and only then, I would say important prereqs are Abstract Algebra and Topology. I believe the motivation for Category theory lies in Algebraic Geometry and Algebraic Topology, but you definitely don't need to be an expert on these to learn it.