Closing a WebSocket in Functional Programming - Effect Community