This is (should be) the exact equivalent of the Cilia code in Carbon:

Note
Is there really no range operator and no classical for-loop in Carbon?