Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 1223159

Browse files
committed
呼び出し対象関数を整備
1 parent 26f5879 commit 1223159

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.mapk.fastkfunction.singleargfastkfunction
2+
3+
data class Constructor1(val arg: Int) {
4+
fun instanceFun1(arg: Int) = Constructor1(this.arg + arg)
5+
6+
companion object {
7+
fun companionObjectFun1(arg: Int) = Constructor1(arg)
8+
}
9+
}
10+
11+
fun topLevelFun1(arg: Int) = Constructor1(arg)
12+
13+
fun Constructor1.topLevelExtensionFun1(arg: Int) = Constructor1(this.arg + arg)

0 commit comments

Comments
 (0)