Skip to content
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

Updated SyntacticConveniences.scala #129

Merged
merged 1 commit into from Jun 19, 2020
Merged

Updated SyntacticConveniences.scala #129

merged 1 commit into from Jun 19, 2020

Conversation

batakpout
Copy link
Contributor

toList method was not properly written.

toList method was not properly written.
@BenFradet
Copy link
Member

Thanks 👍 , merging.

Copy link
Contributor

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

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

Thanks @aamir-f . However, the current implementation is also valid since it's calling to:

 /** Given a collection factory `factory`, convert this collection to the appropriate
    * representation for the current element type `A`. Example uses:
    *
    *      xs.to(List)
    *      xs.to(ArrayBuffer)
    *      xs.to(BitSet) // for xs: Iterable[Int]
    */
  def to[C1](factory: Factory[A, C1]): C1 = factory.fromSpecific(this)

So it seems to be equivalent.

@juanpedromoreno juanpedromoreno merged commit 94f19a6 into scala-exercises:master Jun 19, 2020
@batakpout
Copy link
Contributor Author

batakpout commented Jun 19, 2020

@juanpedromoreno , I agree the current implementation is also valid, but most of the time learners , who are struggling to get the right answer end up copying code from scala-exercises and pasting in IDE's, so that's the reason I suggested the change....thanks

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.

None yet

3 participants