[Assorted-commits] SF.net SVN: assorted: [431] scala-commons/trunk/src/commons/Debug.scala
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-15 02:31:40
|
Revision: 431 http://assorted.svn.sourceforge.net/assorted/?rev=431&view=rev Author: yangzhang Date: 2008-02-14 18:31:46 -0800 (Thu, 14 Feb 2008) Log Message: ----------- added haskell-like trace Modified Paths: -------------- scala-commons/trunk/src/commons/Debug.scala Modified: scala-commons/trunk/src/commons/Debug.scala =================================================================== --- scala-commons/trunk/src/commons/Debug.scala 2008-02-15 02:31:34 UTC (rev 430) +++ scala-commons/trunk/src/commons/Debug.scala 2008-02-15 02:31:46 UTC (rev 431) @@ -26,6 +26,10 @@ */ object Debug { + def trace[a](label: String, x: a) = { + println(label + x) + x + } val logFile = TextWriter("log") type Level = Int object Levels { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |