functions in traditional programming and functions in math are two different things entirely. They should have been called procedures (I think there's historical debate about this but I can't find the reference). Obviously, functional programming is an attempt to address this.