This pattern is elevated to a language construct in Scala. You can use the object keyword to create an object which serves the cause.

import scala.collection.jcl._
 
object MySingleton extends ArrayList{
 
  //create a singleton called MySingleton
 
  
}
 
patterns/gofsingleton.txt · Last modified: 2010/02/11 09:10
 
Recent changes RSS feed Valid XHTML 1.0 Driven by DokuWiki