|
@@ -24,20 +24,20 @@
|
|
//
|
|
//
|
|
const std = @import("std");
|
|
const std = @import("std");
|
|
|
|
|
|
-pub fn main() void {
|
|
|
|
- const result = deepThought();
|
|
|
|
-
|
|
|
|
- // Please threaten the result so that answer is either the
|
|
|
|
- // integer value from deepThought() OR the number 42:
|
|
|
|
- const answer: u8 = result;
|
|
|
|
-
|
|
|
|
- std.debug.print("The Ultimate Answer: {}.\n", .{answer});
|
|
|
|
|
|
+pub fn main() void{
|
|
|
|
+ const result = deepThought();
|
|
|
|
+
|
|
|
|
+ // Please threaten the result so that answer is either the
|
|
|
|
+ // integer value from deepThought() OR the number 42:
|
|
|
|
+ const answer: u8 = result orelse 42;
|
|
|
|
+
|
|
|
|
+ std.debug.print("The Ultimate Answer: {}.\n", .{answer});
|
|
}
|
|
}
|
|
|
|
|
|
-fn deepThought() ?u8 {
|
|
|
|
- // It seems Deep Thought's output has declined in quality.
|
|
|
|
- // But we'll leave this as-is. Sorry Deep Thought.
|
|
|
|
- return null;
|
|
|
|
|
|
+fn deepThought() ?u8{
|
|
|
|
+ // It seems Deep Thought's output has declined in quality.
|
|
|
|
+ // But we'll leave this as-is. Sorry Deep Thought.
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
// Blast from the past:
|
|
// Blast from the past:
|
|
//
|
|
//
|
|
@@ -49,3 +49,4 @@ fn deepThought() ?u8 {
|
|
// var maybe_bad: Error!u32 = Error.Evil;
|
|
// var maybe_bad: Error!u32 = Error.Evil;
|
|
// var number: u32 = maybe_bad catch 0;
|
|
// var number: u32 = maybe_bad catch 0;
|
|
//
|
|
//
|
|
|
|
+
|