I used all my google-fu trying to find how to make this work; read the docs as well. What have I missed? I feel sure this can't be a new question, but I can't find anything Here is is:
Take[#1, {#2, Length[#1]}] &[V3, 3]
V3 is a List. This above works.
When I do this (someInteger is an unassigned integer variable):
Take[#1, {#2, Length[#1]}] &[V3, someInteger]
I get this error:
Sequence specification (+n, -n, {+n}, {-n}, {m, n}, or {m, n, s}) expected at position 2.
If I only define the pure function (don't pass arguments in [ ]) then it's OK - until the first attempt to use that pure function.
Is this something that should be solved by appropriate use of Evaluate?
Seems List "Takes" are evaluated only with actual numbers and not variables.
EDIT: I am trying to take a successively smaller piece of the List (it's an exercise from a book I'm using).
V3={1,2,3,4,5,6,7,8}
I want to use a pure function to get lists as follows: 1....8 2....8 3....8
It's a trivial exercise using Table, but the apparent difficulty of doing it with a pure function has me puzzled - I'm sure I'm missing something.
V3 = Table[mm, {mm, 1, 5}]
Table[V3[[j ;;]], {j, 1, 5}]
result is {{1, 2, 3, 4, 5}, {2, 3, 4, 5}, {3, 4, 5}, {4, 5}, {5}}