Functions in functional programming take some time to get used to, but I want to try to simplify it a little.
In functional programming, nearly everything is an expression. Although you must eventually do something, generally you should try to isolate those parts by themselves.
In a language like Java, if
is a statement: