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

Bug in last exercise of Partially Applied Functions #132

Closed
genghis-yang opened this issue Jan 9, 2019 · 2 comments
Closed

Bug in last exercise of Partially Applied Functions #132

genghis-yang opened this issue Jan 9, 2019 · 2 comments

Comments

@genghis-yang
Copy link

It says "There was a problem evaluating your answer, please try again later." in the last exercise in Partially Applied Functions even when I can run it successfully in local Scala console.

It seems the operator "=>" was converted to a character '⇒' exceptionally.

I have submitted a PR #131 to fix it. Please check and merge it.

@genghis-yang genghis-yang changed the title Bug in last exercise in Partially Applied Functions Bug in last exercise of Partially Applied Functions Jan 9, 2019
@atisvagyok
Copy link

The Unicode form of "Rightwards Double Arrow" is a valid keyword. You can check it in spec. (https://scala-lang.org/files/archive/spec/2.12/01-lexical-syntax.html#identifiers)

The Unicode operators \u21D2 ‘⇒’ and \u2190 ‘←’, which have the ASCII equivalents => and <-, are also reserved.

The Unicode and ASCII versions can be used interchangeably.

scala> def fun(g: Int ⇒ Boolean) = ???
fun: (g: Int => Boolean)Nothing

scala> def fun(g: Int => Boolean) = ???
fun: (g: Int => Boolean)Nothing

@genghis-yang
Copy link
Author

The Unicode form of "Rightwards Double Arrow" is a valid keyword. You can check it in spec. (https://scala-lang.org/files/archive/spec/2.12/01-lexical-syntax.html#identifiers)

The Unicode operators \u21D2 ‘⇒’ and \u2190 ‘←’, which have the ASCII equivalents => and <-, are also reserved.

The Unicode and ASCII versions can be used interchangeably.

scala> def fun(g: Int ⇒ Boolean) = ???
fun: (g: Int => Boolean)Nothing

scala> def fun(g: Int => Boolean) = ???
fun: (g: Int => Boolean)Nothing

Thanks for your explanation. I will close this issue.

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

No branches or pull requests

2 participants