Change the number of values that this option takes.

The input will be a list of size nvalues, with each item in the list being the output of a call to convert. nvalues must be 2 or greater, since options cannot take a variable number of values, and option has nvalues = 1 by default. If you want to change the type of an option with one value, use convert instead.

Used to implement functions like pair and triple. This must be applied after value conversions and before transformAll.


data class Square(val top: Int, val right: Int, val bottom: Int, val left: Int)
val square by option().int().transformValues(4) { Square(it[0], it[1], it[2], it[3]) }