XylotrechusZ

XylotrechusZ Shell

: /opt/alt/ruby18/share/ri/1.8/system/Array/ [ drwxr-xr-x ]
Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.16.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : flatten-i.yaml
--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array that is a one-dimensional flattening of this array (recursively). That is, for every element that is an array, extract its elements into the new array. If the optional <em>level</em> argument determines the level of recursion to flatten.
- !ruby/struct:SM::Flow::VERB 
  body: "   s = [ 1, 2, 3 ]           #=&gt; [1, 2, 3]\n   t = [ 4, 5, 6, [7, 8] ]   #=&gt; [4, 5, 6, [7, 8]]\n   a = [ s, t, 9, 10 ]       #=&gt; [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]\n   a.flatten                 #=&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n   a = [ 1, 2, [3, [4, 5] ] ]\n   a.flatten(1)              #=&gt; [1, 2, 3, [4, 5]]\n"
full_name: Array#flatten
is_singleton: false
name: flatten
params: |
  array.flatten -> an_array
  array.flatten(level) -> an_array

visibility: public
© 2025 XylotrechusZ