Japt, 1518 bytes
®ou qÃòqÃov
ò mq'_ q-
Input as an array of character arrays.
Explanation:
®ou qÃòqÃov mq'_ q-
® Ã # For each word in the input:
ou # For eachConvert characterthe array:last letter to uppercase
ou q # Join to a #string
Uppercase o # For the last characterword:
q v # Convert it to lowercase
# Join to a string
# Save as U
ò mq'_ q-
ò # Cut U into pairs of words
m # For each pair:
q'_ # Join to a single string with "_" in between
q- # Join all those strings with "-" between
I feel like there's room for improvement, but unfortunately ò doesn't have an overload for "cut into pairs, then reduce each pair".
Japt, 15 bytes
®ou qÃò mq'_ q-
Input as an array of character arrays.
Explanation:
®ou qÃò mq'_ q-
® Ã # For each character array:
ou # Uppercase the last character
q # Join to a string
ò # Cut into pairs of words
m # For each pair:
q'_ # Join to a single string with "_" in between
q- # Join all those strings with "-" between
I feel like there's room for improvement, but unfortunately ò doesn't have an overload for "cut into pairs, then reduce each pair".
Japt, 18 bytes
®ou qÃov
ò mq'_ q-
Input as an array of character arrays.
Explanation:
®ou qÃov
® Ã # For each word in the input:
ou # Convert the last letter to uppercase
q # Join to a string
o # For the last word:
v # Convert it to lowercase
# Save as U
ò mq'_ q-
ò # Cut U into pairs of words
m # For each pair:
q'_ # Join to a single string with "_" in between
q- # Join all those strings with "-" between
Japt, 15 bytes
®ou qÃò mq'_ q-
Input as an array of character arrays.
Explanation:
®ou qÃò mq'_ q-
® Ã # For each character array:
ou # Uppercase the last character
q # Join to a string
ò # Cut into pairs of words
m # For each pair:
q'_ # Join to a single string with "_" in between
q- # Join all those strings with "-" between
I feel like there's room for improvement, but unfortunately ò doesn't have an overload for "cut into pairs, then reduce each pair".