:
, LoC. .
a very trivial functional example would be instead of having a function that computes the inline fibonacci sequence in a loop, I would add a successor function (int a, int b) that is called by fibonacci ().
A more complex example in the mod could be an http client that executes a GET request. I would break it down into something like this:
Connection getConnection(String host, int port)
Request createRequest(String[] params)
void sendRequest(Request r)
String getResponse(Connection c,Request r)
source
share