yes, there is.
please see the SilverStripe documentation on Templates, section Position Indicators
<% loop $SomeList %>
<% if $First %>
this is the first item<br>
<% else_if $Last %>
this is the last item<br>
<% else %>
this is item number $Pos<br>
<% end_if %>
<% end_loop %>