I am trying to get an OCaml function which gives the next line of a Pascal's triangle as a list for example:
(next_line: int -> list -> int list)
let get_next_line [1;1] returns [1;2;1] and so on.
I tried something like this but don't know how to go forward:
let rec next_line lst acc = match lst with| [] -> [1]| hd::tl -> (* need directions here *)