/**
 * This function takes two tuples, t1 and t2, and concatenates them by repeating the second tuple until it is the same length as the first tuple.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @return The concatenated tuple.
 *
 * Examples:
 * tupleConcatRepeat(listOf(1, 2, 3), listOf('a', 'b')) // [1, 2, 3, 'a', 'b', 'a']
 * tupleConcatRepeat(listOf(1, 2, 3, 4), listOf('a', 'b')) // [1, 2, 3, 4, 'a', 'b', 'a', 'b']
 */
fun tupleConcatRepeat(t1: List<Any>, t2: List<Any>): List<Any> {

    var mutableT2 = t2.toMutableList()
    while (mutableT2.size < t1.size) {
        mutableT2.addAll(t2)
    }
    return t1 + mutableT2
}
/**
 * This function takes two tuples, t1 and t2, and concatenates them by repeating the second tuple until it is the same length as the first tuple.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @return The concatenated tuple.
 *
 * Examples:
 * tupleConcatRepeat(listOf(1, 2, 3), listOf('a', 'b')) // [1, 2, 3, 'a', 'b', 'a']
 * tupleConcatRepeat(listOf(1, 2, 3, 4), listOf('a', 'b')) // [1, 2, 3, 4, 'a', 'b', 'a', 'b']
 */
fun tupleConcatRepeat(t1: List<Any>, t2: List<Any>): List<Any> {
/**
 * This function takes two tuples, t1 and t2, and concatenates them by repeating the second tuple until it is the same length as the first tuple.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @return The concatenated tuple.
 *
 * Examples:
 * tupleConcatRepeat(listOf(1, 2, 3), listOf('a', 'b')) // [1, 2, 3, 'a', 'b', 'a']
 * tupleConcatRepeat(listOf(1, 2, 3, 4), listOf('a', 'b')) // [1, 2, 3, 4, 'a', 'b', 'a', 'b']
 */
fun tupleConcatRepeat(t1: List<Any>, t2: List<Any>): List<Any> {

    var mutableT2 = t2.toMutableList()
    while (mutableT2.size < t1.size) {
        mutableT2.addAll(t2)
    }
    return t1 + mutableT2
}