How do you do a CRUD app in your functional language?
I'm not going to give you a long tutorial on this, but it's not hard. You write it like you would anything else.
You have some data that you want to manipulate. You define some way to store, edit, and retrieve that data. (Libraries can handle this for you.)
Then, you make the web UI like you would in any other language. At the top is a function that takes a request and returns a response, which is entirely pure. Then you implement the helper functions as needed; Map URIs to handlers, map request parameters to data to interact with, interact with the data, generate a response, etc.
Anyway, it is not that different from anything else. Why would it be?
the rest of the program is one giant side effect. Monads aren't the answer there, they're a workaround.
I'm not going to give you a long tutorial on this, but it's not hard. You write it like you would anything else.
You have some data that you want to manipulate. You define some way to store, edit, and retrieve that data. (Libraries can handle this for you.)
Then, you make the web UI like you would in any other language. At the top is a function that takes a request and returns a response, which is entirely pure. Then you implement the helper functions as needed; Map URIs to handlers, map request parameters to data to interact with, interact with the data, generate a response, etc.
Anyway, it is not that different from anything else. Why would it be?
the rest of the program is one giant side effect. Monads aren't the answer there, they're a workaround.
You are thinking about the problem wrong.