Common scala utilities