@@ -108,20 +108,6 @@ Calling the `constructor` of an `inner class` or an `extension function` defined
108
108
### How to call
109
109
` FastKFunction ` supports two major types of calls.
110
110
111
- #### Call by vararg or Collection
112
- Calling with ` vararg ` or ` Collection ` is faster if you don't need to use the ` default arguments ` and
113
- can get them in the order in which they are defined.
114
-
115
- ``` kotlin
116
- val fastKFunction: FastKFunction <Sample > = FastKFunction .of(function)
117
-
118
- // call by vararg
119
- val result: Sample = fastKFunction.call(1 , 2 , 3 , 4 , 5 )
120
-
121
- // call by Collection
122
- val result: Sample = fastKFunction.callByCollection(listOf (1 , 2 , 3 , 4 , 5 ))
123
- ```
124
-
125
111
#### Call by ArgumentBucket
126
112
If the ` default argument ` is expected to be used, a call using ` ArgumentBucket ` is available.
127
113
@@ -146,6 +132,20 @@ fun map(src: Map<String, Any?>): Sample {
146
132
}
147
133
```
148
134
135
+ #### Call by vararg or Collection
136
+ Calling with ` vararg ` or ` Collection ` is faster if you don't need to use the ` default arguments ` and
137
+ can get them in the order in which they are defined.
138
+
139
+ ``` kotlin
140
+ val fastKFunction: FastKFunction <Sample > = FastKFunction .of(function)
141
+
142
+ // call by vararg
143
+ val result: Sample = fastKFunction.call(1 , 2 , 3 , 4 , 5 )
144
+
145
+ // call by Collection
146
+ val result: Sample = fastKFunction.callByCollection(listOf (1 , 2 , 3 , 4 , 5 ))
147
+ ```
148
+
149
149
### For functions that can be called from a single argument
150
150
For a function that can be called with a single argument, you can use the ` SingleArgFastKFunction ` .
151
151
0 commit comments