I need a function with some kind of a step-by-step logic and I wonder how I can make one. Let\'s take a log in process on a site as an example, so I need the following logic
You don't need any return statement, as the last value returned by a control flow operation (case/conf/if…) is the function's return value. Check this part of the tutorial. I think cond do is the operator you need in this case.