Deprecate tailRecursive in favor of tailrec
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
== test ==
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
== test ==
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
== test ==
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
== test ==
|
||||
tailRecursive fun test() : Int {
|
||||
tailrec fun test() : Int {
|
||||
try {
|
||||
// do nothing
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
== sum ==
|
||||
tailRecursive fun sum(x: Long, sum: Long): Long {
|
||||
tailrec fun sum(x: Long, sum: Long): Long {
|
||||
if (x == 0.toLong()) return sum
|
||||
return sum(x - 1, sum + x)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
tailRecursive fun sum(x: Long, sum: Long): Long {
|
||||
tailrec fun sum(x: Long, sum: Long): Long {
|
||||
if (x == 0.toLong()) return sum
|
||||
return sum(x - 1, sum + x)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
== sum ==
|
||||
tailRecursive fun sum(x: Long, sum: Long): Long {
|
||||
tailrec fun sum(x: Long, sum: Long): Long {
|
||||
if (x == 0.toLong()) return sum
|
||||
return sum(x - 1, sum + x)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
== foo ==
|
||||
tailRecursive fun foo() {
|
||||
tailrec fun foo() {
|
||||
try {
|
||||
return foo()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
tailRecursive fun foo() {
|
||||
tailrec fun foo() {
|
||||
try {
|
||||
return foo()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
== foo ==
|
||||
tailRecursive fun foo() {
|
||||
tailrec fun foo() {
|
||||
try {
|
||||
return foo()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user