Moving around the map in Shakespearean patterns

Shakespearean templates are there @forallto iterate over a list. Imagine that I have Data.Map.Mapforms m = Map.fromList [("key1","value1"),("key2","value2")]. How can I create a conclusion

<li>key1 – value1</li>
<li>key2 – value2</li>

I already know the solution

$forall (k,v) <- Map.toList m
    <li>#{k} – #{v}

Is this a recommended solution?

+4
source share

Source: https://habr.com/ru/post/1531623/


All Articles