Monday, May 30, 2011

Last Element of a List [Recursion ]

lstElm::[Int]->Int
lstElm [x]=x
lstElm (x:xs)=lstElm xs

No comments:

Post a Comment