Added last and palindrome functions
Added replicate function