Lessons
Nim · Easy
Nim · Easy. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
ref objects and inheritance
Heap objects with ref, nil, inheritance with of RootObj, and dynamic dispatch with method.

Lesson 2
Generics
Generic procs and types with [T], constraints with typeclasses, and explicit instantiation.

Lesson 3
Tables
Hash maps with std/tables: Table, toTable, getOrDefault, mgetOrPut, and CountTable.

Lesson 4
sequtils and functional style
map, filter, foldl, mapIt, filterIt, anyIt, zip, and toSeq.

Lesson 5
Option and Result-style returns
std/options for missing values, some/none, get, isSome, map, and returning errors.

Lesson 6
Modules and visibility
import, from/import, export markers *, include vs import, and nimble packages.

Lesson 7
Operators and UFCS
Define operators as procs, `$` for printing, `==` for equality, and method-call chaining.

Lesson 8
Distinct types
Type-safe wrappers with distinct, borrow pragmas, and preventing unit mix-ups.

Lesson 9
Files and the OS
readFile, writeFile, lines iterator, File handles, paths, and command-line arguments.

Lesson 10
Iterators
Inline and closure iterators, yield, items/pairs, and writing iterators for your types.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.