Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sebastien FURIC <sebastien.furic@t...>
Subject: Re: [Caml-list] function

"" a écrit :
> Hi all,
> I would want to know if a function exists that allows me to make this:
> ["123";"45";"678"]  ->  [1;2;3;4;5;6;7;8;].

 You could split the problem into several simple ones:

 - Given a strings, return the list of its characters:
  explode : string -> char list
 - Given a list of chars, return a list of ints using
  chars_to_ints : char list -> int list
 - And then, given a list of strings, apply a composition of the
previous functions to it (and collect the results) using List.fold_right
for instance...


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: