Skip to main content
deleted 2 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

NOTE: Unfortunately, works only in versions prior to 12.0.0; it doesn't work in version 12.0.0 (thanks: Christopher Lamb). It works in version 12.3 and in versions prior to 12.0.

NOTE: Unfortunately, works only in versions prior to 12.0.0; it doesn't work in version 12.0.0 (thanks: Christopher Lamb).

NOTE: doesn't work in version 12.0.0 (thanks: Christopher Lamb). It works in version 12.3 and in versions prior to 12.0.

added 136 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

NOTE: Unfortunately, works only in versions prior to 12.0.0; it doesn't work in version 12.0.0 (thanks: Christopher Lamb).

Update: The same idea used with Part as in MannyC's answer:

Update: The same idea used with Part as in MannyC's answer:

NOTE: Unfortunately, works only in versions prior to 12.0.0; it doesn't work in version 12.0.0 (thanks: Christopher Lamb).

Update: The same idea used with Part as in MannyC's answer:

deleted 7 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
ClearAll[☺☺]
☺☺[a_, b_, c_, d_: All] := [[Mod[ca[[Mod[c - 1 + Range[b], Length@a, 1][[d]]]];
☺☺[{a, b, c, d}, 4, 1, -1 ;; 
  1 ;; -1] (* reverse*)
ClearAll[☺☺]
☺☺[a_, b_, c_, d_: All] := [[Mod[c - 1 + Range[b], Length@a, 1][[d]]]];
☺☺[{a, b, c, d}, 4, 1, -1 ;; 
  1 ;; -1] (* reverse*)
ClearAll[☺☺]
☺☺[a_, b_, c_, d_: All] := a[[Mod[c - 1 + Range[b], Length@a, 1][[d]]]];
☺☺[{a, b, c, d}, 4, 1, -1 ;; 1 ;; -1] (* reverse*)
added 840 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
Loading
added 73 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
Loading
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
Loading