Difference between revisions of "Array.pack()"

From ZCubes Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
Remove consecutive duplicates and compact the array.
 
Remove consecutive duplicates and compact the array.
 +
 +
Example:
  
 
[1,2,3,[3,4,4],[3,4,4],3].pack()
 
[1,2,3,[3,4,4],[3,4,4],3].pack()
  
{| style="" id="TABLE1" class="null" donotcaption="true" | |- | 1 |- | 2 |- | 3 |- | 3 | 4 |- | 3     |}
+
 
 +
{| style="" id="TABLE1" class="null wikitable" donotcaption="true" |  
 +
|-
 +
| 1  
 +
 +
|-
 +
| 2  
 +
 +
|-
 +
| 3  
 +
 +
|-
 +
| 3  
 +
| 4  
 +
 +
|-
 +
| 3  
 +
 +
 +
|}

Latest revision as of 18:52, 5 February 2020


Array.pack()

Remove consecutive duplicates and compact the array.

Example:

[1,2,3,[3,4,4],[3,4,4],3].pack()


1
2
3
3 4
3