Mercurial > urweb
comparison lib/ur/monad.ur @ 917:321a2d6feb40
dragList demo working, save for Gecko load delay and highlighting
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 08 Sep 2009 10:55:49 -0400 |
parents | 8e540df3294d |
children | 37dd42935dad |
comparison
equal
deleted
inserted
replaced
916:b873feb3eb52 | 917:321a2d6feb40 |
---|---|
5 others <- acc; | 5 others <- acc; |
6 return ({nm = this} ++ others)) | 6 return ({nm = this} ++ others)) |
7 (return {}) [ts] fd r | 7 (return {}) [ts] fd r |
8 | 8 |
9 fun ignore [m ::: Type -> Type] (_ : monad m) [t] (v : m t) = x <- v; return () | 9 fun ignore [m ::: Type -> Type] (_ : monad m) [t] (v : m t) = x <- v; return () |
10 | |
11 fun mp [m] (_ : monad m) [a] [b] f m = | |
12 v <- m; | |
13 return (f v) | |
10 | 14 |
11 fun foldR [K] [m] (_ : monad m) [tf :: K -> Type] [tr :: {K} -> Type] | 15 fun foldR [K] [m] (_ : monad m) [tf :: K -> Type] [tr :: {K} -> Type] |
12 (f : nm :: Name -> t :: K -> rest :: {K} | 16 (f : nm :: Name -> t :: K -> rest :: {K} |
13 -> [[nm] ~ rest] => | 17 -> [[nm] ~ rest] => |
14 tf t -> tr rest -> m (tr ([nm = t] ++ rest))) | 18 tf t -> tr rest -> m (tr ([nm = t] ++ rest))) |