@@ -166,8 +166,8 @@ of those methods are, use the [`methods()`](@ref) function:
166
166
``` julia
167
167
julia> methods (f)
168
168
# 2 methods for generic function "f":
169
- f (x:: Float64 , y:: Float64 ) in Main at none: 1
170
- f (x:: Number , y:: Number ) in Main at none: 1
169
+ [ 1 ] f (x:: Float64 , y:: Float64 ) in Main at none: 1
170
+ [ 2 ] f (x:: Number , y:: Number ) in Main at none: 1
171
171
```
172
172
173
173
which shows that ` f ` has two methods, one taking two ` Float64 ` arguments and one taking arguments
@@ -196,25 +196,25 @@ of methods:
196
196
``` julia
197
197
julia> methods (+ )
198
198
# 180 methods for generic function "+":
199
- + (x:: Bool , z:: Complex{Bool} ) in Base at complex. jl: 224
200
- + (x:: Bool , y:: Bool ) in Base at bool. jl: 89
201
- + (x:: Bool ) in Base at bool. jl: 86
202
- + (x:: Bool , y:: T ) where T<: AbstractFloat in Base at bool. jl: 96
203
- + (x:: Bool , z:: Complex ) in Base at complex. jl: 231
204
- + (a:: Float16 , b:: Float16 ) in Base at float. jl: 372
205
- + (x:: Float32 , y:: Float32 ) in Base at float. jl: 374
206
- + (x:: Float64 , y:: Float64 ) in Base at float. jl: 375
207
- + (z:: Complex{Bool} , x:: Bool ) in Base at complex. jl: 225
208
- + (z:: Complex{Bool} , x:: Real ) in Base at complex. jl: 239
209
- + (x:: Char , y:: Integer ) in Base at char. jl: 40
210
- + (c:: BigInt , x:: BigFloat ) in Base. MPFR at mpfr. jl: 303
211
- + (a:: BigInt , b:: BigInt , c:: BigInt , d:: BigInt , e:: BigInt ) in Base. GMP at gmp. jl: 303
212
- + (a:: BigInt , b:: BigInt , c:: BigInt , d:: BigInt ) in Base. GMP at gmp. jl: 296
213
- + (a:: BigInt , b:: BigInt , c:: BigInt ) in Base. GMP at gmp. jl: 290
214
- + (x:: BigInt , y:: BigInt ) in Base. GMP at gmp. jl: 258
215
- + (x:: BigInt , c:: Union{UInt16, UInt32, UInt64, UInt8} ) in Base. GMP at gmp. jl: 315
199
+ [ 1 ] + (x:: Bool , z:: Complex{Bool} ) in Base at complex. jl: 227
200
+ [ 2 ] + (x:: Bool , y:: Bool ) in Base at bool. jl: 89
201
+ [ 3 ] + (x:: Bool ) in Base at bool. jl: 86
202
+ [ 4 ] + (x:: Bool , y:: T ) where T<: AbstractFloat in Base at bool. jl: 96
203
+ [ 5 ] + (x:: Bool , z:: Complex ) in Base at complex. jl: 234
204
+ [ 6 ] + (a:: Float16 , b:: Float16 ) in Base at float. jl: 373
205
+ [ 7 ] + (x:: Float32 , y:: Float32 ) in Base at float. jl: 375
206
+ [ 8 ] + (x:: Float64 , y:: Float64 ) in Base at float. jl: 376
207
+ [ 9 ] + (z:: Complex{Bool} , x:: Bool ) in Base at complex. jl: 228
208
+ [ 10 ] + (z:: Complex{Bool} , x:: Real ) in Base at complex. jl: 242
209
+ [ 11 ] + (x:: Char , y:: Integer ) in Base at char. jl: 40
210
+ [ 12 ] + (c:: BigInt , x:: BigFloat ) in Base. MPFR at mpfr. jl: 307
211
+ [ 13 ] + (a:: BigInt , b:: BigInt , c:: BigInt , d:: BigInt , e:: BigInt ) in Base. GMP at gmp. jl: 392
212
+ [ 14 ] + (a:: BigInt , b:: BigInt , c:: BigInt , d:: BigInt ) in Base. GMP at gmp. jl: 391
213
+ [ 15 ] + (a:: BigInt , b:: BigInt , c:: BigInt ) in Base. GMP at gmp. jl: 390
214
+ [ 16 ] + (x:: BigInt , y:: BigInt ) in Base. GMP at gmp. jl: 361
215
+ [ 17 ] + (x:: BigInt , c:: Union{UInt16, UInt32, UInt64, UInt8} ) in Base. GMP at gmp. jl: 398
216
216
...
217
- + (a, b, c, xs... ) at operators. jl: 119
217
+ [ 180 ] + (a, b, c, xs... ) in Base at operators. jl: 424
218
218
```
219
219
220
220
Multiple dispatch together with the flexible parametric type system give Julia its ability to
0 commit comments