For-comprehensions for number generation, asserts, java conversions