To close standard libs gap, let&#x27;s assume I have static functions for odd() and take() as well as Java8 stream APIs statically imported. After this, it looks pretty compact and readable:<p><pre><code>    take(10, i -&gt; range(0, i)
                    .mapToObj(j -&gt; odd(i))
                    .collect(joining(&quot; &quot;)))
    .collect(joining(&quot; &quot;));
</code></pre>
For reference, odd and take will look like this:<p><pre><code>    private static String odd(int i) {
        return Boolean.toString(i % 2 != 0);
    }

    private static &lt;T&gt; Stream&lt;T&gt; take(int n, Function&lt;Integer, T&gt; f) {
        return Stream.iterate(1, i -&gt; ++i).map(f).limit(n);
    }</code></pre>