
                |&gt; <span class="hljs-type">List</span>.filter (\{ year } -&gt; year == <span class="hljs-number">1850</span>)
                |&gt; <span class="hljs-type">List</span>.partition (\{ gender } -&gt; gender == <span class="hljs-type">M</span>)

        categories =
            partitioned
                |&gt; <span class="hljs-type">Tuple</span>.first
                |&gt; <span class="hljs-type">List</span>.map .age
                |&gt; <span class="hljs-type">List</span>.reverse

      