Newbie qustion about monads
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Thu Oct 2 12:22:13 EDT 2003
W liście z czw, 02-10-2003, godz. 11:13, Juanma Barranquero pisze:
> The intent is that Counted objects "count" the number of times an
> operation is applied to them.
As you discovered, there is no meaningful count of operations. If an
operation doesn't do anything, do you count it? I suppose yes - but
monad laws say that "return" *really* doesn't do anything, and you
incremented the count for it. "return" should have the count of 0.
Some other operations could have a positive count, there is no obvious
choice which ones.
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
More information about the Haskell-Cafe