From 0a1278c211efe71b147c4c6a5751baf1761de91d Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Wed, 19 Feb 2025 10:47:52 +0530 Subject: [PATCH] Update methods.md This is a minor change, given the different syntax from usual methods/functions, using a different name for the example may make it clearer that there is nothing special about the name `p` used in the definition of the function. --- doc/src/manual/methods.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/manual/methods.md b/doc/src/manual/methods.md index 45d22e08aaffe..e7f6514a64506 100644 --- a/doc/src/manual/methods.md +++ b/doc/src/manual/methods.md @@ -1002,13 +1002,13 @@ there is a terse syntax form. In the function body, `p` will refer to the object called. A `Polynomial` can be used as follows: ```jldoctest polynomial -julia> p = Polynomial([1,10,100]) +julia> poly = Polynomial([1,10,100]) Polynomial{Int64}([1, 10, 100]) -julia> p(3) +julia> poly(3) 931 -julia> p() +julia> poly() 2551 ```