Skip to content

Fix order of responses for poly exercise #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/scala/shapeless/PolyExercises.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object PolyExercises extends FlatSpec with Matchers with exercise.Section {
* mapped across an ordinary Scala List
*/
def exerciseMonomorphicChoose(res0: Option[Int], res1: Option[Int]) = {
(List(Set(1, 3, 5), Set(2, 4, 6)) map choose) should be(List(res1, res0))
(List(Set(1, 3, 5), Set(2, 4, 6)) map choose) should be(List(res0, res1))
}

/** However, they are [[http://www.chuusai.com/2012/05/10/shapeless-polymorphic-function-values-2/ more general than natural transformations]] and are able to capture type-specific cases
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/exercises/shapeless/PolySpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PolySpec extends Spec with Checkers {
check(
Test.testSuccess(
PolyExercises.exerciseMonomorphicChoose _,
Option(2) :: Option(1) :: HNil
Option(1) :: Option(2) :: HNil
)
)
}
Expand Down