There isn't a variable like $CURRENT_RESULT that I am aware of. You could do something manual/ugly like this:
function Foo
{
$OFS = ','
$r1 = & {
1
2
}
$r1
Write-Host "Returning $r1"
$r2 = & {
3
4
}
$r2
Write-Host "Returning $r2"
}
You also mention wanting to know the values before the function returns. Note that if you run this function and don't capture its output, 1 and 2 show up before the first call to Write-Host e.g:
PS> Foo
1
2
Returning 1,2
3
4
Returning 3,4
This is because functions behave like cmdlets i.e. they write to the output as soon as output becomes available. So in this regard, PowerShell functions don't quite behave like a traditional function.