Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Remove try #56

Merged
merged 1 commit into from Jul 2, 2020
Merged

Remove try #56

merged 1 commit into from Jul 2, 2020

Conversation

aballano
Copy link
Member

@aballano aballano commented Jul 2, 2020

No description provided.

@aballano aballano marked this pull request as ready for review July 2, 2020 14:32
@@ -130,7 +129,7 @@ interface ListSnoc<A> : Snoc<List<A>, A> {

override fun snoc() = object : Prism<List<A>, Tuple2<List<A>, A>> {
override fun getOrModify(s: List<A>): Either<List<A>, Tuple2<List<A>, A>> =
Option.applicative().mapN(Try { s.dropLast(1) }.toOption(), s.lastOrNull().toOption(), ::identity)
Option.applicative().mapN(Option.just(s.dropLast(1)), s.lastOrNull().toOption(), ::identity)
Copy link
Member

Choose a reason for hiding this comment

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

👍
why was this even Try { } 😕

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷

@aballano aballano merged commit e6bf543 into master Jul 2, 2020
@aballano aballano deleted the ab/deprecate-datatypes branch July 2, 2020 15:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants