A factory function is a very specific concept that dynamically returns objects of many different…
Mike MacCana
1

You’re confusing the factory pattern with factory functions.

From the Wikipedia article you referenced:

More broadly, a subroutine that returns a “new” object may be referred to as a “factory”, as in factory method or factory function.