[MLton-commit] r4836
Vesa Karvonen
vesak at mlton.org
Sun Nov 19 10:08:28 PST 2006
Added Sq.map.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
U mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-19 17:20:55 UTC (rev 4835)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-19 18:08:26 UTC (rev 4836)
@@ -7,4 +7,5 @@
structure Sq :> SQ = struct
type 'a t = 'a * 'a
fun mk x = (x, x)
+ fun map f (x, y) = (f x, f y)
end
Modified: mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-19 17:20:55 UTC (rev 4835)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-19 18:08:26 UTC (rev 4836)
@@ -14,4 +14,7 @@
val mk : 'a -> 'a t
(** {mk x = (x, x)}. *)
+
+ val map : ('a -> 'b) -> 'a t -> 'b t
+ (** {map f (x, y) = (f x, f y)}. *)
end
More information about the MLton-commit
mailing list