SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def using[T <: { def close(): Unit }, S](objects: Seq[T])(operation: Seq[T] => S) = {
- val result = try {
- operation(objects)
- } finally {
- objects.foreach(_.close())
- }
- result
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.