/**
 * This function takes two lists representing the species found in two different samples.
 * It finds and returns a list of common species found in both samples.
 *
 * @param t1 List of species found in the first sample
 * @param t2 List of species found in the second sample
 * @return List of species common to both samples
 */
fun findCommonSpecies(t1: List<String>, t2: List<String>): List<String> {

    // Initialize an empty list to store the common species
    val commonSpecies = mutableListOf<String>()

    // Loop through each species in the first sample list
    for (species1 in t1) {
        // Loop through each species in the second sample list
        for (species2 in t2) {
            // Check if the current species in the first sample is equal to the current species in the second sample
            if (species1 == species2) {
                // Append the common species to the list
                commonSpecies.add(species1)
            }
        }
    }

    return commonSpecies
}
/**
 * This function takes two lists representing the species found in two different samples.
 * It finds and returns a list of common species found in both samples.
 *
 * @param t1 List of species found in the first sample
 * @param t2 List of species found in the second sample
 * @return List of species common to both samples
 */
fun findCommonSpecies(t1: List<String>, t2: List<String>): List<String> {
/**
 * This function takes two lists representing the species found in two different samples.
 * It finds and returns a list of common species found in both samples.
 *
 * @param t1 List of species found in the first sample
 * @param t2 List of species found in the second sample
 * @return List of species common to both samples
 */
fun findCommonSpecies(t1: List<String>, t2: List<String>): List<String> {

    // Initialize an empty list to store the common species
    val commonSpecies = mutableListOf<String>()

    // Loop through each species in the first sample list
    for (species1 in t1) {
        // Loop through each species in the second sample list
        for (species2 in t2) {
            // Check if the current species in the first sample is equal to the current species in the second sample
            if (species1 == species2) {
                // Append the common species to the list
                commonSpecies.add(species1)
            }
        }
    }

    return commonSpecies
}