Browse Source

Hinting return type rather than making 'em guess.

Dave Gauer 4 years ago
parent
commit
a361b90a75
1 changed files with 1 additions and 1 deletions
  1. 1 1
      18_functions.zig

+ 1 - 1
18_functions.zig

@@ -5,7 +5,7 @@ const std = @import("std");
 
 pub fn main() void {
     // The new function deepThought() should return the number 42. See below.
-    const answer = deepThought();
+    const answer: u8 = deepThought();
     
     std.debug.print("Answer to the Ultimate Question: {}\n", .{answer});
 }