Make maximum fold arr.length in foldUpTo