Skip to main content
added 472 characters in body
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101

##Pyke, 11 bytes

.F~]+=])K~]

Try it here!

Explanation:

.F~]+=])    - Deep for loop
  ~]        -    contents of `]` ([] by default)
    +       -  ^+i
     =]     - `]` = ^
        K~] - Output value
        K   - Remove the output from the for loop
         ~] - Return the contents of `]`

###Or 7 bytes after a bugfix

M?+]K~]

Try it here!

Explanation:

M?+]    - Deep map
 ?+]    -  `]` = `]`+i
    K~] - Output value
    K   - Remove the output from the for loop
     ~] - Return the contents of `]`

###Or even 2 bytes if printing to stdout is allowed (This might come under built-ins)

M
<newline required>

Try it here!

This deeply applies the print_newline function to every non-sequence item in the input and recurses for sequence items.

##Pyke, 11 bytes

.F~]+=])K~]

Try it here!

###Or 7 bytes after a bugfix

M?+]K~]

Try it here!

##Pyke, 11 bytes

.F~]+=])K~]

Try it here!

Explanation:

.F~]+=])    - Deep for loop
  ~]        -    contents of `]` ([] by default)
    +       -  ^+i
     =]     - `]` = ^
        K~] - Output value
        K   - Remove the output from the for loop
         ~] - Return the contents of `]`

###Or 7 bytes after a bugfix

M?+]K~]

Try it here!

Explanation:

M?+]    - Deep map
 ?+]    -  `]` = `]`+i
    K~] - Output value
    K   - Remove the output from the for loop
     ~] - Return the contents of `]`

###Or even 2 bytes if printing to stdout is allowed (This might come under built-ins)

M
<newline required>

Try it here!

This deeply applies the print_newline function to every non-sequence item in the input and recurses for sequence items.

Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101

##Pyke, 11 bytes

.F~]+=])K~]

Try it here!

###Or 7 bytes after a bugfix

M?+]K~]

Try it here!