You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
James Brundage edited this page Oct 23, 2026
·
1 revision
Palindrome
Wave Melody Palindrome
Plays a melody in normal order, and then plays a melody in reversed order.
The resulting letters in the melody will form a palindrome
View Source
<#.SYNOPSIS Wave Melody Palindrome.DESCRIPTION Plays a melody in normal order, and then plays a melody in reversed order. The resulting letters in the melody will form a palindrome.LINK https://en.wikipedia.org/wiki/Palindrome#>$melody=@($this.Melody)
# If there is not a current melody, return thisif (-not$melody) { return$this }
# Assign the current melody to the palindrome$this.Melody=@(
$melody
[Array]::Reverse($melody)
$melody
)
# Play the sound.return$this.Sound()