PSLinq.ps1
function skip-until([scriptblock]$filter = {$true}, [switch]$exclude ) { begin { [bool]$found = $false } process { if ($found) { return $_ } if (-not $found) { $res = & $filter $found = $res if (-not $exclude -and $found) { return $_ } } } } function skip-until:::Test { 1,2,3,4 | skip-until -filter { $_ -eq 3 } | Assert 3, 4 1,2,3,4 | skip-until -filter { $_ -eq 3 } -exclude | Assert 4 } |