Browse Source

Merge branch 'main' of github.com:ratfactor/ziglings into main

Dave Gauer 4 years ago
parent
commit
96cb465fb8
2 changed files with 7 additions and 5 deletions
  1. 5 3
      README.md
  2. 2 2
      exercises/04_arrays.zig

+ 5 - 3
README.md

@@ -1,13 +1,15 @@
 # ziglings
 # ziglings
 
 
-Welcome to `ziglings`! This project contains a series of incomplete exercises.
-By completing the exercises, you learn how to read and write
+Welcome to `ziglings`! This project contains a series of tiny broken programs.
+By fixing them, you'll learn how to read and write
 [Zig](https://ziglang.org/)
 [Zig](https://ziglang.org/)
-code.
+code!
 
 
 This project was directly inspired by the brilliant and fun
 This project was directly inspired by the brilliant and fun
 [rustlings](https://github.com/rust-lang/rustlings)
 [rustlings](https://github.com/rust-lang/rustlings)
 project for the [Rust](https://www.rust-lang.org/) language.
 project for the [Rust](https://www.rust-lang.org/) language.
+Indirect inspiration comes from [Ruby Koans]( http://rubykoans.com/)
+and the Little LISPer/Little Schemer series of books.
 
 
 ## Intended Audience
 ## Intended Audience
 
 

+ 2 - 2
exercises/04_arrays.zig

@@ -11,11 +11,11 @@
 //
 //
 // Get values of an array using array[index] notation:
 // Get values of an array using array[index] notation:
 //
 //
-//     const bar = foo[3]; // 5423
+//     const bar = foo[2]; // 5423
 //
 //
 // Set values of an array using array[index] notation:
 // Set values of an array using array[index] notation:
 //
 //
-//     foo[3] = 16;
+//     foo[2] = 16;
 //
 //
 // Get the length of an array using the len property:
 // Get the length of an array using the len property:
 //
 //