Unfortunately the signature wont make this function pure.

Why not?

@tuxOr

There is nothing to do with the signature of a function.

A function is pure if and only if

So in your example, assuming process(var1, var2) will make some side effect somewhere else in the program, it is not a pure function.

process(var1, var2)

However, if process do not make any changes, then it will still be a pure function.

process

I think I understood now, thank you!

We're a place where coders share, stay up-to-date and grow their careers.

We strive for transparency and don't collect excess data.

## re: Functional programming basics part 1: Pure function VIEW POST

TOP OF THREAD FULL DISCUSSIONWhy not?

@tuxOr

There is nothing to do with the signature of a function.

A function is pure if and only if

onlywith the argumentsSo in your example, assuming

`process(var1, var2)`

will make some side effect somewhere else in the program, it is not a pure function.However, if

`process`

do not make any changes, then it will still be a pure function.I think I understood now, thank you!