Uncurry implementation