diff --git a/lib/stdio.sb b/lib/stdio.sb index 34b0b7a..966a8b8 100644 --- a/lib/stdio.sb +++ b/lib/stdio.sb @@ -7,4 +7,14 @@ fn print(msg) { // Like print(), but with an extra newline ('\n') character fn println(msg) { print(msg + "\n") +} + +// Prints the size of an array +fn len(arr) { + let c = 0 + while arr[c] { + c = c + 1 + } + + return c } \ No newline at end of file