Skip to content

Instantly share code, notes, and snippets.

@jakedouglas
Created April 2, 2011 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakedouglas/899885 to your computer and use it in GitHub Desktop.
Save jakedouglas/899885 to your computer and use it in GitHub Desktop.
(0 to 7).foldLeft(BigInt(0)) { (acc, idx) =>
idx match {
case 7 => acc | bytes.get(idx)
case _ => acc | bytes.get(idx) << 8
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment