# How to input a list of arbitrary length into a function?

I would like to Write a function which takes a list of numerators, of arbitrary length, and produces a simple continued fraction of the form

    cf[{a,b,c,d}] =  a/(1+b/(1+c/(1+d)))


So far I did this

    cf[a_, b_, c_, d_] = Fold[g, 0, { d, c, b, a}]


but I do not know how to generalise it to a list of arbitrary length, so that user can type in any number of variables.

cf[a__] := Fold[g, 0, {a}]