Questions on function usage in the context of Unix & Linux (mostly but not exclusively shell scripts). Questions on programming in Python, Perl, Ruby, etc. should be asked on Stack Overflow.
In the context of programming a function is a sub-routine that on input produces output or side effects defined by an algorithm. Functions are used to structure a program and to encapsulate smaller tasks.
Since functions make typically sense only in the context of a specific programming language, the function tag should be used together with a tag indicating the programming language.