assert_equal([1], take_while([1, 2, 3, 4], odd))