Added one-of func. Inspired by paip.