[MLton-commit] r6651
Vesa Karvonen
vesak at mlton.org
Wed Jun 11 02:55:32 PDT 2008
Added fori to List, Array, and Vector.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/LICENSE
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/list.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/vector.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/LICENSE
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/LICENSE 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/LICENSE 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,5 +1,6 @@
COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
+Copyright (C) 2007-2008 Vesa Karvonen
Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
Permission to use, copy, modify, and distribute this software and its
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2008 Vesa Karvonen
+ * Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
*
* This code is released under the MLton license, a BSD-style license.
* See the LICENSE file or http://mlton.org/License for details.
@@ -169,4 +170,5 @@
val sort = stableSort
fun iso ? = Pair.map (map, map) ?
fun for xs ef = app ef xs
+ fun fori xs ef = appi ef xs
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2008 Vesa Karvonen
+ * Copyright (C) 2006-2008 SSH Communications Security, Helsinki, Finland
*
* This code is released under the MLton license, a BSD-style license.
* See the LICENSE file or http://mlton.org/License for details.
@@ -9,7 +10,8 @@
val foldr : ('a * 'b -> 'b) -> 'b -> 'a t -> 'b
val fromList : 'a List.t -> 'a t
val maxLen : Int.t
- val app : 'a Effect.t -> 'a t Effect.t) = struct
+ val app : 'a Effect.t -> 'a t Effect.t
+ val appi : (Int.t * 'a) Effect.t -> 'a t Effect.t) = struct
fun empty () = tabulate (0, Basic.undefined)
fun unfoldi fis (n, s) = let
fun lp (i, s, xs) =
@@ -20,4 +22,5 @@
fun toList t = foldr op :: [] t
val isoList = (toList, fromList)
fun for xs ef = app ef xs
+ fun fori xs ef = appi ef xs
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/array.sig 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/array.sig 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2008 Vesa Karvonen
+ * Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
*
* This code is released under the MLton license, a BSD-style license.
* See the LICENSE file or http://mlton.org/License for details.
@@ -23,6 +24,7 @@
*)
val for : 'a t -> 'a Effect.t Effect.t
+ val fori : 'a t -> (Int.t * 'a) Effect.t Effect.t
(** == HOFs == *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/list.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/list.sig 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/list.sig 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2008 Vesa Karvonen
+ * Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
*
* This code is released under the MLton license, a BSD-style license.
* See the LICENSE file or http://mlton.org/License for details.
@@ -71,6 +72,7 @@
val findSome : ('a -> 'b Option.t) -> 'a t -> 'b Option.t
val for : 'a t -> 'a Effect.t Effect.t
+ val fori : 'a t -> (Int.t * 'a) Effect.t Effect.t
(** == Indexed HOFs == *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/vector.sig 2008-06-11 09:50:07 UTC (rev 6650)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/sequence/vector.sig 2008-06-11 09:55:31 UTC (rev 6651)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2008 Vesa Karvonen
+ * Copyright (C) 2006-2007 SSH Communications Security, Helsinki, Finland
*
* This code is released under the MLton license, a BSD-style license.
* See the LICENSE file or http://mlton.org/License for details.
@@ -22,6 +23,7 @@
*)
val for : 'a t -> 'a Effect.t Effect.t
+ val fori : 'a t -> (Int.t * 'a) Effect.t Effect.t
(** == Conversions == *)
More information about the MLton-commit
mailing list