ilya.gorbunov
buildSequence { val uniques = mutableSetOf<Int>() list.forEach { if (!uniques.add(it)) yield(it) } }.distinct()