Skip to content

making iterateRight an extension of Iterator #1430

Closed
plastic-karma wants to merge 0 commit intoarrow-kt:masterfrom
plastic-karma:issue_1428
Closed

making iterateRight an extension of Iterator #1430
plastic-karma wants to merge 0 commit intoarrow-kt:masterfrom
plastic-karma:issue_1428

Conversation

@plastic-karma
Copy link
Contributor

Fix #1428.

}
}

fun <A, B> Iterator<A>.iterateRight(lb: Eval<B>): (f: (A, Eval<B>) -> Eval<B>) -> Eval<B> =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there! This function returns another function, which isn't necessary in Kotlin. Make f a second parameter instead.

@pakoito
Copy link
Member

pakoito commented May 1, 2019

For the build to pass you'll also need to fix:

/home/travis/build/arrow-kt/arrow/modules/core/arrow-extras-data/src/main/kotlin/arrow/data/MapK.kt:13:1: Unused import
/home/travis/build/arrow-kt/arrow/modules/core/arrow-extras-data/src/main/kotlin/arrow/data/SortedMapK.kt:11:1: Unused import

@plastic-karma
Copy link
Contributor Author

For the build to pass you'll also need to fix:

/home/travis/build/arrow-kt/arrow/modules/core/arrow-extras-data/src/main/kotlin/arrow/data/MapK.kt:13:1: Unused import
/home/travis/build/arrow-kt/arrow/modules/core/arrow-extras-data/src/main/kotlin/arrow/data/SortedMapK.kt:11:1: Unused import

Great, I'll fix it. Is there a gradle command I could have run to have caught this before pushing ?


@Deprecated(DeprecatedAmbiguity, ReplaceWith("raiseError(e)"))
fun raise(e: Throwable): Try<Nothing> = Failure(e)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These looks like a merge error to me! 😱

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I tried to rebase the branch to the latest version from the upstream fork

@pakoito
Copy link
Member

pakoito commented May 5, 2019

Great, I'll fix it. Is there a gradle command I could have run to have caught this before pushing ?

Yep, there's the build where you can check the tasks run. In this case, :arrow-extras-data:ktlintMainSourceSetCheck

https://travis-ci.org/arrow-kt/arrow/jobs/526942020#L5284-L5286

@plastic-karma plastic-karma deleted the issue_1428 branch May 5, 2019 01:14
@plastic-karma
Copy link
Contributor Author

I created a new request (after messing up the branch): #1434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Foldable#iterateRight more Kotlin-y

2 participants