@uncheckedit is defined only for the selector in the matching operation, and not for arbitrary functions. So you could
foreach{ x => (x: @unchecked) => x match { case List(a,b) => ... } }
but itโs rather a sip.
, ( PartialFunction):
def checkless[A,B](pf: PartialFunction[A,B]): A => B = pf: A => B
samples.sliding(2).foreach(checkless{
case List(a,b) => printf("%x %x\n", a.value, b.value)
})
, .