# apply (10-apply.org) People say apply when they want to put something to use or submit a request. You apply for a job, apply sunscreen, or apply a rule to a situation. It means taking something and making it active or relevant. ## What a model may hear - higher-order function (functional programming): treat the word as a function that calls another function with arguments packed into a list or array - matrix or array operation (linear algebra, data science): broadcast a function across rows, columns, or elements of a data structure - configuration or patch (infrastructure as code, Kubernetes): execute a manifest, deploy a resource, or reconcile desired state against a cluster - function method on objects (JavaScript, Python): invoke a callable with a specific this value or bound context ## Where people and models part ways - Says: "Apply this to the whole team" Means: Use this policy for everyone on the team May be taken as: Broadcast an operation across an array of team member objects or run a deployment named team Say instead: "Use this policy for everyone on the team" - Says: "Apply the discount" Means: Give the customer the lower price May be taken as: Execute a function called discount with unexpected arguments or scope Say instead: "Give the customer the lower price" - Says: "Apply what you just said" Means: Use that previous explanation now May be taken as: Re-invoke the last function call or re-run the last code block Say instead: "Use your previous explanation in this new situation" ## Tips - Say use instead of apply when you mean employ or put into practice - Name the specific action: say calculate, send, or update instead of apply - Say run or execute only if you want code to run - Avoid apply followed by a list or array, which sounds like functional programming - Say for everyone or to each person to avoid sounding like array broadcasting ## Often confused with - map: transform each element and return results - call: invoke directly with fixed arguments - invoke: run by name with standard binding - deploy: send code to run on infrastructure - implement: build out the details of a plan