OCAML programming
Pascal triangle
Write a function
val nextpascalrow : int list -> int list = that given a list of integers that correspond to a row of the pascal triangle, it calculates the next row of the pascal triangle.# nextpascalrow [1; 6; 15; 20; 15; 6; 1];;- : int list = [1; 7; 21; 35; 35; 21; 7; 1]
that given a list of integers that correspond to a row of the pascal triangle, it calculates the next row of the pascal triangle.
# nextpascalrow [1; 6; 15; 20; 15; 6; 1];;- : int list = [1; 7; 21; 35; 35; 21; 7; 1]
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here