A Tour of hd
Each page introduces a few features, each with a small example, and gives you a program to run and change beside it. Most pages end with one change to try, which shows the error hd gives.
Contents
- HelloScripts · Values inside strings
- Values and bindingsNumber literals ·
:=andlet· Conversions · Names in strings - FunctionsParameters and results ·
ifgives a value · Pipes - Lists, maps, and loopsLists · Maps · Lookup ·
forloops · Comprehensions - Closures and iteratorsClosures · Lazy iterators · Tuples
- StructsDeclaring a struct · Writable fields · Values copy · Changed copies
- ReferencesReading in place · Writing in place · Stored references · Shared objects
- Enums and matchEnums ·
match - Traits and genericsTraits · Implementations · Generic functions
- Absence and failure
Option·Result·?· Matching a result - Typed errors
@errortypes ·@from· Context · Reports - Derivation
@derive· The derived behavior - TestsThe
tests:block · Examples, tables, and properties - ModulesFiles are modules ·
pub·use - RequirementsRequirement rows ·
mainsets the limit · Replacing a provider - SuspensionSuspending functions · Up to
main! - Concurrency
join!·race!· Timeouts - Where nextFurther reading · One last program
Want the syntax on one page? Read Learn hd in 10 Minutes.