Created
July 17, 2018 21:35
-
-
Save exelotl/751892cb240704b5af84b29ba6ba3c39 to your computer and use it in GitHub Desktop.
define a `+` operator for string concatenation
This file contains 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
proc `+`*(a:string, b:string):string = a & b | |
proc `+`*[T](a:string, b:T):string = a & $b | |
proc `+`*[T](a:T, b:string):string = $a & b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment