another example using Y combinator