``` fun <A> flat(listOfOptions: List<...
# arrow
k
Copy code
fun <A> flat(listOfOptions: List<Option<A>>): List<A> {
        return listOfOptions.fold(mutableListOf(), { acc, opt ->
            when (opt) {
                is Some -> {
                    acc.add(opt.t)
                    acc
                }
                is None -> acc
            }
        })
    }