--- a/src/Pure/Concurrent/synchronized.scala Thu Apr 24 00:29:55 2014 +0200
+++ b/src/Pure/Concurrent/synchronized.scala Thu Apr 24 10:24:44 2014 +0200
@@ -17,9 +17,9 @@
final class Synchronized[A] private(init: A)
{
private var state: A = init
- def apply(): A = synchronized { state }
- def >> (f: A => A) = synchronized { state = f(state) }
- def >>>[B] (f: A => (B, A)): B = synchronized {
+ def value: A = synchronized { state }
+ def change(f: A => A) = synchronized { state = f(state) }
+ def change_result[B](f: A => (B, A)): B = synchronized {
val (result, new_state) = f(state)
state = new_state
result