Difference between revisions of "Array.pipall()"
Jump to navigation
Jump to search
(Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...") |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 8: | Line 8: | ||
*pipall does not modify the original array. | *pipall does not modify the original array. | ||
*pipping starts at SomeExceptIndexUpto, and the arrays are marked as sliced if SomeMarkSliced is true. This may be useful for later [[Array.unpip()|unpipping]] | *pipping starts at SomeExceptIndexUpto, and the arrays are marked as sliced if SomeMarkSliced is true. This may be useful for later [[Array.unpip()|unpipping]] | ||
+ | *pipallwithslice calls pipall with SomeMarkSliced marked as true. | ||
+ | *reversepip does the pipall in the reverse direction. | ||
Example: | Example: | ||
Line 52: | Line 54: | ||
[4,3,8 ] | [4,3,8 ] | ||
] | ] | ||
+ | |||
+ | ==See Also== | ||
+ | [[Array.pip() | pip]] | ||
+ | |||
+ | [[Array.pieces() | pieces]] |
Latest revision as of 01:37, 4 May 2020
Array.pipall(SomeExceptIndexUpto, SomeMarkSliced)
- pip is push plus insert.
- pipall does not modify the original array.
- pipping starts at SomeExceptIndexUpto, and the arrays are marked as sliced if SomeMarkSliced is true. This may be useful for later unpipping
- pipallwithslice calls pipall with SomeMarkSliced marked as true.
- reversepip does the pipall in the reverse direction.
Example: 1..10.pip(5,2)
1
2
3
4
5
6 7
8
9
10
MAGICSQUARE(3).pip([1,1],2).print()
[ [2,7,6 ],
[9, [5,1 ] ],
[4,3,8 ] ]
MAGICSQUARE(3).pip([1,1],2,x=>SUM(x)).print()
[ [2,7,6 ],
[9,6 ],
[4,3,8 ] ]