Mercurial > urweb
annotate lib/ur/monad.ur @ 903:63114a2e5075
<dyn> inside <tr>
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Aug 2009 14:57:44 -0400 |
parents | d1d0b18afd3d |
children | 7a4b026e45dd |
rev | line source |
---|---|
adamc@834 | 1 fun exec [m ::: Type -> Type] (_ : monad m) [ts ::: {Type}] r (fd : folder ts) = |
adamc@834 | 2 foldR [m] [fn ts => m $ts] |
adamc@834 | 3 (fn [nm :: Name] [v :: Type] [rest :: {Type}] [[nm] ~ rest] action acc => |
adamc@834 | 4 this <- action; |
adamc@834 | 5 others <- acc; |
adamc@834 | 6 return ({nm = this} ++ others)) |
adamc@834 | 7 (return {}) [ts] fd r |
adamc@898 | 8 |
adamc@898 | 9 fun ignore [m ::: Type -> Type] (_ : monad m) [t] (v : m t) = x <- v; return () |