scala
object Responder

[source: `scala/Responder.scala`]

`` `object` Responder
  `extends` AnyRef

  This object contains utility methods to build responders.

Author
  Burak Emir
Version
  1.0
See Also
  class Responder
Since
  revision 6897 (will be 2.1.1)

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]