Some common Scala functionality