better y combinator in test case