Skip to content
All courses
HollowScriptBeginner

HollowScript Fundamentals

Write your first HollowScript programs from scratch, straight in the browser. Store values, make decisions with optional values, loop over lists, write functions and closures, then handle errors properly with Result and match.

Free to browse. You sign in at the first lesson so your progress is saved.

What you will be able to do

  • Store values with constant and variable, and show output with uses print and effect print
  • Make decisions with if/else and handle an absent value with String? and none
  • Loop over a list with for and build up a running total
  • Write functions, including ones that return another function (closures)
  • Handle failure explicitly with Result, success/failure, match and the ? operator

Syllabus

6 modules and 6 lessons. Each lesson is a short read followed by an exercise with tests.

Module 1

Values and output

Store a value and show it with uses print and effect print.1 lesson, about 10 min
  1. 1Showing a resultWrite your first HollowScript program and print a value from it.10 min
Module 2

Names

The difference between a constant and a variable.1 lesson, about 10 min
  1. 2constant and variableUse variable for a value that changes, and print it once it settles.10 min
Module 3

Decisions

if/else, and an optional value that might be none.1 lesson, about 12 min
  1. 3Conditionals and noneBranch with if/else, and handle a value that might be absent.12 min
Module 4

Lists and loops

Loop over a list with for, and build up a running total.1 lesson, about 12 min
  1. 4Lists and loopsWrite a list literal and loop over it with for.12 min
Module 5

Functions and closures

Write functions, and functions that return other functions.1 lesson, about 12 min
  1. 5Functions and closuresDeclare a function, and a function that builds another function.12 min
Module 6

Errors

Handle failure explicitly with Result, success/failure and match.1 lesson, about 14 min
  1. 6Errors with Result and matchReturn a Result instead of guessing, and handle both sides with match.14 min