Color theme
0 day streak0 XPP1
ElixirLearn mode
MISSION 1 OF 1

Find quick preparation steps

0 XP earned
Elixir track: AdvancedMission: BeginnerEnumerationAnonymous functionsFiltering
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.

x
0 / 2 challenges
LEARN THE CONCEPT

Understand it, then try it.

Enum.filter walks through a collection and keeps each value for which a function returns true. The fn ... end form defines that function inline. A recipe planner uses it to keep preparation steps shorter than ten minutes. Enum.join then formats the remaining durations in the same order.

observatory.exs
minutes = [4, 12, 7, 18]quick = Enum.filter(minutes, fn minute -> minute < 10 end)report = Enum.join(quick, ", ")IO.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.

Track the values line by line. Predict the result before running this example in your own editor.