Created
March 18, 2015 17:15
-
-
Save matxpg/22a44c7297bd16707911 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\matthew\a4\mpg317\problem2>ghci | |
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
Prelude> :l problem2.hs | |
[1 of 1] Compiling Main ( problem2.hs, interpreted ) | |
Ok, modules loaded: Main. | |
*Main> safetail_cond [1, 2, 3 | |
<interactive>:3:23: | |
parse error (possibly incorrect indentation or mismatched brackets) | |
*Main> safetail_cond [1, 2, 3] | |
[2,3] | |
*Main> safetail_cond [1, 2, 3, 4, 5] | |
[2,3,4,5] | |
*Main> safetail_cond ['a', 'b', 'c'] | |
"bc" | |
*Main> safetail_guarded [1, 2, 3] | |
[2,3] | |
*Main> safetail_pattern [1, 2, 3] | |
[2,3] | |
*Main> safetail_cond [] | |
[] | |
*Main> safetail_guarded [] | |
[] | |
*Main> safetail_pattern [] | |
[] | |
*Main> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment