CSCE 314 Programming Languages - TAMU Computer Science ...
CSCE 314 Programming Languages - TAMU Computer Science ...
CSCE 314 Programming Languages - TAMU Computer Science ...
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Exercises(1)Consider a function safetail that behaves inthe same way as tail, except that safetailmaps the empty list to the empty list, whereastail gives an error in this case. Define safetailusing:(a) "a conditional expression;(b) "guarded equations;(c) "pattern matching.Hint: the library function null :: [a] → Bool canbe used to test if a list is empty.20