ether #766(2007/07/13 15:02 GMT) [ OCaml ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14
let rec make_ladder = function | [] -> print_newline (); [] | [x] -> print_endline "| "; [x] | x::y::xs when x < y -> print_string "|_| "; (y::x::make_ladder xs) | x::y::xs -> print_string "| "; (x::make_ladder (y::xs)) let rec amida l = let rec complete = function | [x] -> true | x::y::xs -> x > y && complete (y::xs) in if (complete l) then make_ladder l else (amida (make_ladder l)) ;;
Rating0/0=0.00-0+
[ reply ]
ether
#766()
[
OCaml
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]