Make use of passing functions in painter, but we can't get much further without allowing def-as-value