Skip to content

Update scala-for-java-programmers #1553

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

Closed
wants to merge 1 commit into from
Closed

Update scala-for-java-programmers #1553

wants to merge 1 commit into from

Conversation

max-k7v
Copy link

@max-k7v max-k7v commented Oct 17, 2019

As I understood, for current example truth table looks like (sure if == defined correctly):

this/that  <  <= >  >=
1/2        t  t  f  f
2/2        f  t  f* t*
3/2        f  f  t  t

where t - true,
      f - false
      * - incorrect value
As I understood, for current example truth table looks like (sure if == defined correctly):

this/that  <  <= >  >=
1/2        t  t  f  f
2/2        f  t  f* t*
3/2        f  f  t  t

where t - true,
      f - false
      * - incorrect value
@max-k7v max-k7v changed the title small mistype in example Oct 18, 2019
@ashawley
Copy link
Member

I'm not seeing anything wrong with the current implementation of Ord trait on that page:

https://docs.scala-lang.org/tutorials/scala-for-java-programmers.html#traits

2 > 2 should be false, and 2 >= 2 should be true.

@Philippus
Copy link
Member

I agree, the current implementation is correct.

@Philippus Philippus closed this Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants