Hi,<br> I'm still somewhat new to Haskell, so I'm wondering if there are better ways I could implement the following functions, especially shiftl:<br><br>>> moves the first element to the end of the list<br>
shiftr :: [a] -> [a]<br> shiftr [] = []<br> shiftr (x:y) = y ++ [x]<br> <br>>> moves the last element to the head of the list<br> shiftl :: [a] -> [a]<br> shiftl [] = []<br> shiftl x = [last x] ++ init x
<br><br>-Eric<br>