Doctest for scala