Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isPos n
- | n<0 = False
- | otherwise = True
- isPos n
- | n<0 = False AND print ("negative")
- | otherwise = True AND print ("positive")
- debug = flip trace
- isPos n
- | n < 0 = False `debug` "negative"
- | otherwise = True `debug` "positive"
- isPos n
- | n < 0 = False -- `debug` "negative"
- | otherwise = True -- `debug` "positive"
- import Debug.Trace
- isPos n
- | n < 0 = trace "negative" False
- | otherwise = trace "positive" True
Add Comment
Please, Sign In to add comment