typo, it should be `var g = clone(f, cloneCustom);`