Please use the Question Tags to state the name and full version number of the story format you are using, as answers can vary based on this information. I will assume you are using the default story format which is Harlowe v2.1.0
You use the (history:) macro to access the collection, and the (for:) macro to loop through the names contained within the returned Array. The last element in the Array returned by the (history:) macro is the name of the previous Passage, not the name of the current Passage.
(set: $names to (history:))
(for: each _name, ...$names)[