type inference for functions

only a single return statement supported for now
type inference for binary operators
type inference for unary operators
type inference for tuples
fix compile warnings