-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Add a new construct "$foreach" that works like $forall but yields the current element along with the remaining elements.
Usage:
[hamlet|
<ul>
$foreach (curr, rest) <- elements
<li>#{show curr}
$if not (null rest)
<hr>
|]
Compared with:
[hamlet|
<ul>
$with n <- length elements
$forall (i,curr) <- zip irange elements
<li>#{show curr}
$if i /= n
<hr>
|]
where
irange = [ 1 :: Int .. ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels