A method of polymorphic execution of the algorithms on multiple data context is suggested. The method allows us to construct efficient algorithms without duplicating code and can work seamlessly with relational data structures.