def using[A, B <: {def close() : Unit}](closeable: B)(f: B => A): A = try { f(closeable) } finally { closeable.close() } 用法