We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/dwango/scala_text/blob/f760890047eace599cd32546cc0c7d66075914b4/src/type-parameter.md#演習問題
immutableといっているし、(いずれにせよmutableだとしても) isEmpty などは副作用はないはずなので、 def isEmpty() ではなく def isEmpty にしておくべきではないか?
def isEmpty()
def isEmpty
def pop() もある意味同様の問題があるが、空の場合は例外投げるので、副作用あると捉えることも可能(?)なので、微妙に別問題?
def pop()
気がついてないだけで、同様の問題は他にもあるかもしれない
The text was updated successfully, but these errors were encountered:
も同様ですね。空の場合例外投げるというのは、副作用というよりpop()が部分関数(Scalaの意味ででなく、数学的な意味での)であることを表しているだけなので(部分関数であることを表現するために例外を使用しているというべきか?)。
pop()
Sorry, something went wrong.
https://github.com/dwango/scala_text/pull/41 で修正したのでひとまずclose (他にもあれば、再openか、別途issueたてる)
No branches or pull requests
https://github.com/dwango/scala_text/blob/f760890047eace599cd32546cc0c7d66075914b4/src/type-parameter.md#演習問題
immutableといっているし、(いずれにせよmutableだとしても) isEmpty などは副作用はないはずなので、
def isEmpty()
ではなくdef isEmpty
にしておくべきではないか?def pop()
もある意味同様の問題があるが、空の場合は例外投げるので、副作用あると捉えることも可能(?)なので、微妙に別問題?気がついてないだけで、同様の問題は他にもあるかもしれない
The text was updated successfully, but these errors were encountered: