Browse thread
[Caml-list] ocaml and large development projects
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Siegfried Gonzi <siegfried.gonzi@s...> |
| Subject: | Re: [Caml-list] Reading a file |
Siegfried Gonzi wrote: > Michal Moskal wrote: > >> >> If you expand each line of megabyte file to list of characters -- it >> cannot be fast. >> > Enclosed the OCaml version in question: > > 'split' has been pinched up from comp.lang.functional. A year ago I had > a conversation there and someone posted this split function tailored to > my request: split "nil,2.23,3.34,nil" (-1.0) = [-1.0,2.23,3.34,-1.0] sorry: split "nil,2.23,.3.34,nil" ',' delivers: ["nil","2.23","3.34","nil"] I use then List.map (frob (-1.0)) ["nil","2.23","3.34","nil"] in order to convert it to floating-point numbers. S. Gonzi ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners