getcurrent function

Get the current element of a iterator