Scala porting sweep #17