/**
 * This function concatenates the given notes with itself 'repeat' number of times,
 * and subtracts the given value 'subtract', in order to create a new list of notes.
 * The function performs exceptionally complex operations on the given inputs.
 *
 * @param notes A tuple of musical notes
 * @param repeat Number of times to repeat the notes
 * @param subtract Value to subtract from each note
 * @return A new tuple of modified notes
 */
fun concatenateRepeatSubtractNotes(notes: List<Int>, repeat: Int, subtract: Int): List<Int> {

    require(notes is List) { "Input 'notes' must be a list" }
    require(repeat > 0) { "Input 'repeat' must be a positive integer" }

    val newNotes = notes.flatMap { List(repeat) { it } }
    val modifiedNotes = newNotes.map { it - subtract }

    return modifiedNotes
}
/**
 * This function concatenates the given notes with itself 'repeat' number of times,
 * and subtracts the given value 'subtract', in order to create a new list of notes.
 * The function performs exceptionally complex operations on the given inputs.
 *
 * @param notes A tuple of musical notes
 * @param repeat Number of times to repeat the notes
 * @param subtract Value to subtract from each note
 * @return A new tuple of modified notes
 */
fun concatenateRepeatSubtractNotes(notes: List<Int>, repeat: Int, subtract: Int): List<Int> {
/**
 * This function concatenates the given notes with itself 'repeat' number of times,
 * and subtracts the given value 'subtract', in order to create a new list of notes.
 * The function performs exceptionally complex operations on the given inputs.
 *
 * @param notes A tuple of musical notes
 * @param repeat Number of times to repeat the notes
 * @param subtract Value to subtract from each note
 * @return A new tuple of modified notes
 */
fun concatenateRepeatSubtractNotes(notes: List<Int>, repeat: Int, subtract: Int): List<Int> {

    require(notes is List) { "Input 'notes' must be a list" }
    require(repeat > 0) { "Input 'repeat' must be a positive integer" }

    val newNotes = notes.flatMap { List(repeat) { it } }
    val modifiedNotes = newNotes.map { it - subtract }

    return modifiedNotes
}