Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // a bit "impure", but it
  2. // uses local mutation only
  3. // and is a lot faster.
  4.  
  5. // this is what I would do in
  6. // a real world scenario
  7.  
  8. let makeList dr =  
  9.  
  10.   let mutable r = []
  11.  
  12.   let makeItem () =
  13.     // code for reading data from dr...
  14.    
  15.   while dr.Read() do
  16.     r <- (makeItem() :: r)
  17.  
  18.   rac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement