scala

object Responder

[source: scala/Responder.scala]

object Responder
extends AnyRef
This object contains utility methods to build responders.
Author
Martin Odersky
Burak Emir
Version
1.0
See Also
class Responder
Method Summary
def constant [A](x : A) : Responder[A]
Creates a responder that answer continuations with the constant a.
def exec [A](x : => Unit) : Boolean
Executes x and returns true, useful as syntactic convenience in for comprehensions.
def loop [A](r : Responder[Unit]) : Responder[Nothing]
def loopWhile [A](cond : => Boolean)(r : Responder[Unit]) : Responder[Unit]
def run [A](r : Responder[A]) : Option[A]
runs a responder, returning an optional result
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def constant[A](x : A) : Responder[A]
Creates a responder that answer continuations with the constant a.
Parameters
x - ...
Returns
...

def exec[A](x : => Unit) : Boolean
Executes x and returns true, useful as syntactic convenience in for comprehensions.
Parameters
x - ...
Returns
...

def run[A](r : Responder[A]) : Option[A]
runs a responder, returning an optional result

def loop[A](r : Responder[Unit]) : Responder[Nothing]

def loopWhile[A](cond : => Boolean)(r : Responder[Unit]) : Responder[Unit]