diff --git a/io/day1_questions.io b/io/day1_questions.io new file mode 100644 index 0000000..27d7b0b --- /dev/null +++ b/io/day1_questions.io @@ -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