static fun <A : Any!> limit(@NonNull list: MutableList<A>, maxSize: Int): MutableList<A>!
Creates new list based on provided list that contains no more than provide max size count.
list
- MutableList<A>: list that is going to be processed
maxSize
- Int: maximum number of elements that new list should contain.
Return
MutableList<A>!: new list that contains no more than maxSize elements