Last active
February 3, 2026 20:23
-
-
Save dacr/c1eee4f6735f456671f28fadbcbaefba to your computer and use it in GitHub Desktop.
implicit class scala feature. / published by https://github.com/dacr/code-examples-manager #7c2fd589-a63b-4d76-bdf6-90c812f99335/c078f374bc3be07536e6f2c36a5207fdbb2cfce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // summary : implicit class scala feature. | |
| // keywords : scala, language-feature, implicit-class, @testable | |
| // publish : gist | |
| // authors : David Crosson | |
| // license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) | |
| // id : 7c2fd589-a63b-4d76-bdf6-90c812f99335 | |
| // created-on : 2020-05-31T19:54:52Z | |
| // managed-by : https://github.com/dacr/code-examples-manager | |
| // run-with : scala-cli $file | |
| // --------------------- | |
| //> using scala "3.4.2" | |
| // --------------------- | |
| implicit class SuperRichString(in:String) { def truc = in.size/2} | |
| println("hello".truc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment