Skip to content

Instantly share code, notes, and snippets.

@Aankhen
Forked from sheki/abc.scala
Created February 10, 2012 08:03
Show Gist options
  • Save Aankhen/1787669 to your computer and use it in GitHub Desktop.
Save Aankhen/1787669 to your computer and use it in GitHub Desktop.
func() = {
def rec(i: Int, acc: List[Array[Byte]]) {
if (i == 0)
acc
else
channel.basicGet(queueName, true) match {
case x: GetResponse => rec(i - 1, x.getBody +: acc)
case _ => acc
}
}
rec(noItems, List.empty)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment