Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/idlbasis-devel/src/system/Basis/Implementation/word8-vector-slice.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/system/Basis/Implementation/word8-vector-slice.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 865, Sat Jun 30 03:40:12 2001 UTC revision 866, Mon Jul 2 16:33:10 2001 UTC
# Line 145  Line 145 
145         in app start         in app start
146        end        end
147    
148  (* val mapi : (int * elem -> 'b) -> slice -> vector *)  (* val mapi : (int * elem -> elem) -> slice -> vector *)
149      fun mapi f (SL{base,start,stop}) =
150          Word8Vector.tabulate (stop - start, fn i => f (i, sub' (base, start + i)))
151    
152    (*
153    fun mapi f (SL{base,start,stop}) =    fun mapi f (SL{base,start,stop}) =
154        let val len = stop - start        let val len = stop - start
155            fun mapf (i, l) = if (i < stop)            fun mapf (i, l) = if (i < stop)
# Line 155  Line 159 
159                then mapf (start, [])                then mapf (start, [])
160            else Assembly.vector0            else Assembly.vector0
161        end        end
162    *)
163    
164  (* val map  : (elem -> 'b) -> slice -> vector *)  (* val map  : (elem -> elem) -> slice -> vector *)
165      fun map f (SL{base,start,stop}) =
166          Word8Vector.tabulate (stop - start, fn i => f (sub' (base, start + i)))
167    (*
168    fun map f (SL{base,start,stop}) =    fun map f (SL{base,start,stop}) =
169        let val len = stop - start        let val len = stop - start
170            fun mapf (i, l) = if (i < stop)            fun mapf (i, l) = if (i < stop)
# Line 167  Line 175 
175                then mapf (start, [])                then mapf (start, [])
176                else Assembly.vector0                else Assembly.vector0
177            end            end
178    *)
179    
180  (* val foldli : (int * elem * 'b -> 'b) -> 'b -> slice -> 'b *)  (* val foldli : (int * elem * 'b -> 'b) -> 'b -> slice -> 'b *)
181    fun foldli f init (SL{base,start,stop}) =    fun foldli f init (SL{base,start,stop}) =

Legend:
Removed from v.865  
changed lines
  Added in v.866

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0