python3 compatibility for reduce
Context works for functions
Context tests aswell!!