I'm aware that this may be closed as offtopic but there are people around with "offtopic" knowledge :)
So, in List context we can: #[[n ;; ]] and #[[ ;; n]], but we can't do this in context of Sequence. Only ##n is available.
One may do
f[n_] := Unevaluated[##][[;; n]] &
f[2][1, 2, 3, 4]
Sequence[1, 2]
but it is not what I'm looking for.
It is very often when I would like to use it. Of course there are no problems with workarounds. I'm just curious.
p.s. Syntax is an issue for sure, I thought something like ###2 could stand for this but ### is automatically interpreted as ##1 #1.
Comments
Post a Comment