Im new to functional programming and I have an assignment to compute partial sum of a list.
E.g. - psum [1,1,1,1,1]; val it = [1,2,3,4,5] : int list
Here is the my code so far. However my function just returns the list as it is.
E.g. - psum [1,1,1,1,1]; val it = [1,2,3,4,5] : int list
Here is the my code so far. However my function just returns the list as it is.
fun psum([])=[] | ppsum2(x::L) = x::ppsum2(L); psum([2,3,4]);