[MLton-commit] r5477

Vesa Karvonen vesak at mlton.org
Thu Mar 29 05:23:30 PST 2007


Minor optimization and simplification.  With monads one probably should
minimize binds (>>=) as it is a user defined operation (and might be
costly).

----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun

----------------------------------------------------------------------

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun	2007-03-29 13:14:56 UTC (rev 5476)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun	2007-03-29 13:23:30 UTC (rev 5477)
@@ -17,7 +17,7 @@
    fun aM >>& bM = map Product.& (aM >>* bM)
    fun aM >> bM = map #2 (aM >>* bM)
 
-   fun ignore m = m >> return ()
+   fun ignore m = map Effect.ignore m
    fun (y2zM oo x2yM) x = x2yM x >>= y2zM
 
    local




More information about the MLton-commit mailing list