Day 5
This commit is contained in:
+10
-2
@@ -3,6 +3,14 @@ let read_file filename =
|
||||
let s = really_input_string ch (in_channel_length ch) in
|
||||
close_in ch;
|
||||
s
|
||||
;;
|
||||
;;
|
||||
|
||||
let list_of_chars str = List.init (String.length str) (String.get str)
|
||||
let list_of_chars str =
|
||||
List.init (String.length str) (String.get str)
|
||||
;;
|
||||
|
||||
let rec transpose = function
|
||||
| []
|
||||
| [] :: _ -> []
|
||||
| rows -> List.map List.hd rows :: transpose (List.map List.tl rows)
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user