We emphasize and demonstrate that besides using the usual recursion relations involving successive layers, generalized Fresnel coefficients of a multilayer can equivalently be calculated using the recursion relations involving stacks of layers, as introduced some time ago [M. S. Tomaš, Phys. Rev. A 51, 2545 (1995)]. Moreover, since the definition of the generalized Fresnel coefficients employed does not imply properties of the stacks, these nonstandard recursion relations can be used to calculate Fresnel coefficients not only for a local but also for a general multilayer consisting of various types (local, nonlocal, inhomogeneous, etc.) of layers. Their utility is illustrated by deriving a few simple algorithms for calculating the reflectivity of a Bragg mirror and extending the formula for the Casimir force in a planar cavity to arbitrary media.