Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 20th, 2018 74 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1.   def using[T <: { def close(): Unit }, S](objects: Seq[T])(operation: Seq[T] => S) = {
  2.     val result = try {
  3.       operation(objects)
  4.     } finally {
  5.       objects.foreach(_.close())
  6.     }
  7.  
  8.     result
  9.   }
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. OK, I Understand
 
Top