Unpack a telescope result
Before you start this advanced track
Functions and collections. Work with immutable data, tuples, atoms, and pattern matching.
Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.
Predict the result.
What status report is printed?
result = {:ok, "aligned"}{:ok, message} = resultreport = "Telescope: " <> messageIO.puts(report)Each mission is a standalone Elixir script run with elixir. Only standard-library modules are used. Answers describe printed output, excluding any extra value an interactive IEx session would echo.
Review the lesson
An Elixir tuple can carry a status atom alongside a message. Pattern matching checks that its shape and status match what the program expects, then binds the message to a variable. The <> operator joins strings. This compact pattern is useful for handling successful results returned by other functions.