parent
d2fd7d876c
commit
43c291729c
@ -0,0 +1,16 @@
|
||||
"Is io strongly typed? " print
|
||||
|
||||
try(
|
||||
1 + "one"
|
||||
"no" println
|
||||
) catch (
|
||||
"yes" println
|
||||
)
|
||||
|
||||
isTruthy := method(x, if(x, true, false))
|
||||
|
||||
"Is 0 truthy or falsy? #{isTruthy(0)}" interpolate println
|
||||
"Is nil truthy or falsy? #{isTruthy(nil)}" interpolate println
|
||||
|
||||
# Triple quote to avoid escaping
|
||||
"""Is "" truthy or falsy? #{isTruthy("")}""" interpolate println
|
Loading…
Reference in new issue