Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Difference between `mod` and `rem` in Haskell

They’re not the same when the second argument is negative:

2 `mod` (-3)  ==  -1
2 `rem` (-3)  ==  2

Related Posts:

  1. Understanding the functions elem and isInfixOf
  2. Haskell – parse error on input `|’
  3. absolute values in Haskell
  4. Reverse a list in haskell
  5. Haskell Merge Sort
  6. How to fix “variable not in scope” error in GHCI?
  7. Division in Haskell
  8. What does the “Just” syntax mean in Haskell?
  9. How to split a string in Haskell?
  10. Haskell pattern matching – what is it?
  11. What does Cons and :-: mean in Haskell?
  12. Using map in Haskell
  13. Learning Haskell: How to remove an item from a List in Haskell
  14. Why is the minimalist, example Haskell quicksort not a “true” quicksort?
  15. Error haskell: not in scope. What does that mean?
  16. How do I use the filter function in Haskell?
  17. Haskell: Converting Int to String
  18. Insertion sort in Haskell
Categories haskell Tags haskell
Is it possible to program in binary?
Sorting list based on values from another list

Leave a Comment Cancel reply

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress