Guest User

Untitled

a guest
Nov 8th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. open Buffer
  2. (* We're getting a string. *)
  3. let process x =
  4. let r = Buffer.create 100 in
  5. for i = 0 to (String.length(x)-1) do
  6. add_char r, x.[i];
  7. done;
  8. contents r;;
  9.  
  10. open Printf;;
  11. printf "%s" (process "abc$or");;
  12.  
  13.  
  14.  
  15. ----
  16. File "p.ml", line 6, characters 3-21:
  17. Warning 10: this expression should have type unit.
Advertisement
Add Comment
Please, Sign In to add comment