Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Snapshot Examples

This file demonstrates snapshot extraction with both single-line and multi-line formats.

Single-Line Snapshot

A simple single-line snapshot:

let%expect_test "single-line snapshot" =
  let greeting = "Hello, World!" in
  print_endline greeting;

Hello, World!

Multi-Line Snapshot

A multi-line snapshot with multiple lines:

let%expect_test "multi-line snapshot" =
  let lines = [ "First line"; "Second line"; "Third line" ] in
  List.iter ~f:print_endline lines;

First line Second line Third line