News for hackers. Stuff that matters.
Re:Why I Prefer Functional Programming by sorokod on Friday September 20, 2019 @03:47AM (#21024151)
and in Kotlin

    fun alignLines(lines: List<String>): List<String> {
        val maxLength = lines.map { it.length }.max()!!
        return lines.map { " ".repeat((maxLength - it.length) / 2) + it }
    }

There are no comments on this comment yet.