3 ms·
It's both string interpolation and (anonymous) function definition. # Function Definition: addAndStringify = \num1, num2 -> Num.toStr (num1 + n
by itishappy 3y ago
It's both string interpolation and (anonymous) function definition.
# Function Definition:
addAndStringify = \num1, num2 ->
Num.toStr (num1 + num2)
# String Interpolation:
"\(greeting) there, \(audience)!"
# desugars to
Str.concat greeting (Str.concat " there, " (Str.concat audience "!"))
https://www.roc-lang.org/tutorial https://www.roc-lang.org/tutorial