Implicit scope passing and higher order functions