[scala] - About Scala's apply() functions
scala 초보자들의 한가지 혼란스러운 점은, class는 new keyword 없이 만들어진다는 것이다.(ex: val p = person()) 이것은 특별한 함수 apply 덕분이다. -Apply Function Basics 간단한 apply의 사용 예는 object에 사용한 것이다. 이것은 object가 마치 object 그자체로 함수 인 것 처럼 call 할 수 있다. 출처: https://blog.matthewrathbone.com/2017/03/06/scala-object-apply-functions.html 4 Fun and Useful Things to Know about Scala's apply() functions Scala's apply functions are commonly see..
scala
2020. 3. 15. 20:59