mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-11 09:29:59 +00:00
Hinting return type rather than making 'em guess.
This commit is contained in:
@@ -5,7 +5,7 @@ const std = @import("std");
|
|||||||
|
|
||||||
pub fn main() void {
|
pub fn main() void {
|
||||||
// The new function deepThought() should return the number 42. See below.
|
// 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});
|
std.debug.print("Answer to the Ultimate Question: {}\n", .{answer});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user