Both of them seem to work just fine:
Main> myabs 1 1 Main> myabs (-1) 1 Main> abs 1 1 Main> abs (-1) 1
Related Posts:
- Understanding the functions elem and isInfixOf
- Haskell – parse error on input `|’
- Reverse a list in haskell
- Haskell Merge Sort
- Difference between `mod` and `rem` in Haskell
- How to fix “variable not in scope” error in GHCI?
- Division in Haskell
- What does the “Just” syntax mean in Haskell?
- How to split a string in Haskell?
- Haskell pattern matching – what is it?
- What does Cons and :-: mean in Haskell?
- Using map in Haskell
- Learning Haskell: How to remove an item from a List in Haskell
- Why is the minimalist, example Haskell quicksort not a “true” quicksort?
- Error haskell: not in scope. What does that mean?
- How do I use the filter function in Haskell?
- Haskell: Converting Int to String
- Insertion sort in Haskell