Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5941219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:04:45+00:00 2026-05-22T16:04:45+00:00

The documentation for Control.Monad.List.ListT states that it does not yield a monad unless the

  • 0

The documentation for Control.Monad.List.ListT states that it “does not yield a monad unless the argument monad is commutative.”

  1. How do I find out whether a monad is commutative? Is there a CommutativeMonad typeclass? Should there be?

  2. In particular, is Control.Monad.RWS.Lazy.RWS a commutative monad?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:04:46+00:00Added an answer on May 22, 2026 at 4:04 pm

    In general, a monad is commutative if the expression a >>= \x -> b >>= \y -> f x y is equivalent to b >>= \y -> a >>= \x -> f x y.

    In other words, it is commutative if the order of side effects is not important. We can replace the expression:

    do a <- ma
       b <- mb
       f a b
    

    with one which switches the arguments.

    do b <- mb
       a <- ma
       f a b
    

    Most Many common monads are commutative, but you can determine if a particular monad is commutative by either looking at the design and logicking it, or by writing a small program to test it with appropriate expressions (which naturally depend on the nature of the monad). As far as I know there is no CommutativeMonad typeclass.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the documentation of hardware that allows us to control it via UDP/IP, I
Documentation simply states that setting setAutosavingDelay to anything > 0 on the shared doc
The documentation for the round() function states that you pass it a number, and
where is the MSDN documentation that describes how multiple processes can control and own
Is there documentation/utility that shows the default control template of a given control? I'd
QThread::terminate() documentation states that it is discouraged to terminate a thread by calling this
The FuelPHP documentation does not include information on how to use the DB class
Okay, I can't find this in DevExpress' documentation. I have a DevExpress Wizard Control
The documentation of the ListView control (using WinApi) seem to lack some basic information,
Documentation states: Adds a user-defined custom member to an instance of a Windows PowerShell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.