@@ -0,0 +1,1177 @@
+package de.stevenschwenke.java.writingawesomejavacodeworkshop.programmingstyle;%0A%0A/**%0A * Pure functions can be used to write maintainable code that is much easier to debug.%0A */%0Apublic class PureFunctions %7B%0A%0A    /*%0A        Pure functions are functions that%0A        1. always evaluates the same result value given the same argument value(s)%0A        2. don't have any side effects.%0A     */%0A%0A    private int y;%0A%0A    private int myPureFunction(int x) %7B%0A        return x + 1;%0A    %7D%0A%0A    private int myPureFunction2(int x) %7B%0A        return x + y +1;%0A    %7D%0A%0A    private int myNotSoPureFunction(int x) %7B%0A        System.out.println(x); // Side effect!%0A        return x + 1;%0A    %7D%0A%0A    private int myNotSoPureFunction2(int x) %7B%0A        y = 0;  // Side effect!%0A        return x + 1;%0A    %7D%0A%0A    /*%0A        Main benefits of using pure functions:%0A        - Much easier to understand, especially when debugging.%0A        - Developers tend to write shorter methods when these methods are pure functions%0A%0A        Finding out if a method is a pure function:%0A        - add a temporary %22static%22%0A        - let the IDE do the work for you: IDEA shows a little icon at the line of the method%0A     */%0A%0A%7D%0A

Add chapter about Pure Functions