text:
Check if a matrix is a Toeplitz matrix
You will be given a two-dimensional array and a number and you are asked to find whether the given matrix is Toeplitz or not. A matrix is a Toeplitz matrix if every descending diagonal, going from left to right, has only one distinct element. That is, it should be in the form:

Input Format:
You will be given a function which will take two-dimensional matrix as argument.
Output Format:
Return 1 from the function if the matrix is Toeplitz, else return -1.
Constraints:
3 < n,m < 10,000,000

where n is the number of rows while m will be the number of columns.
Sample Test Case:
Sample Input :
4
5
6 7 8 9 2
4 6 7 8 9
1 4 6 7 8
0 1 4 6 7

Sample Output :
1

Scoring
This is code-golf, so the shortest answer in bytes wins.

This is a good challenge, but we prefer laxer I/O requirements here. I'd suggest allowing both programs and functions as is the default. And to allow True/False or 1/0 as outputs, or perhaps just any two consistent distinct outputs as seems to be preferred for decision problems.

Also, a definition of Toeplitz would be good, as would be more test cases including non-Toeplitz ones. Not sure what you mean about adding code.

I think you must reduce the maximum value of n,m. Otherwise the main part of this challenge is to find a way to process a 1 terabyte matrix.

Will the matrix elements always be non-negative integers?

Mathematica, 42 bytes
2Boole[#==ToeplitzMatrix[#&@@@#,#&@@#]]-1&

Mathematica doesn't have a built-in to check whether something is a Toeplitz matrix, but it does have a built-in to generate one. So we generate one from the first column (#&@@@#) and the first row (#&@@#) of the input and check whether it's equal to the input. To convert the True/False result to 1/-1 we use Boole (to give 1 or 0) and then simply transform the result with 2x-1.

Octave, 30 bytes
I'm assuming I don't have to handle 1,000,000x1,000,000 matrices as it says in the challenge. This works for matrices that don't exceed the available memory (less than 1 TB in my case).
@(x)x==toeplitz(x(:,1),x(1,:))

Try it online!
This takes a matrix x as input and creates a Toeplitz matrix based on the values on the first column, and the first row. It will then check each element of the matrices for equality. IF all elements are equal then the input is a Toeplitz matrix.
The output will be a matrix of the same dimensions as the input. If there are any zeros in the output then that's considered falsy be Octave.
Edit:
Just noticed the strict output format:
This works for 41 bytes. It might be possible to golf off a byte or two from this version, but I hope the output rules will be relaxed a bit.
@(x)2*(0||(x==toeplitz(x(:,1),x(1,:))))-1

Jelly, 5 bytes
ŒDE€Ạ

Try it online!
Following the definition here.
ŒDE€Ạ
ŒD     all diagonals
   €   for each diagonal ...
  E       all elements are equal
    Ạ  all diagonal return true

05AB1E, 11 bytes
Œ2ùvy`¦s¨QP

Try it online!
Explanation
Œ             # get all sublists of input
 2ù           # keep only those of length 2
   v          # for each such pair
    y`        # split to separate lists
      ¦       # remove the first element of the second list
       s¨     # remove the last element of the first list
         Q    # compare for equality
          P   # product of stack

Haskell, 43 bytes
f(a:b:t)|init a==tail b=f$b:t|1>0= -1
f _=1

Try it online!

Dang, overcomplicating it again. Curiously, I get that down to 39 bytes with truthy/falsy output, so if Toeplitz = False were allowed I might have beaten it by one byte.

Haskell, 51 bytes
t takes a list of lists of integers and returns an integer.
t m=1-sum[2|or$zipWith((.init).(/=).tail)=<<tail$m]

Try it online!
This could have been 39 or 38 bytes with truthy/falsy output.
The idea to use init was inspired by Emigna's 05AB1E answer, which uses a very similar method; before that I used a nested zipping.
How it works

zipWith((.init).(/=).tail)=<<tail is a point-free form of
\m->zipWith(\x y->tail x/=init y)(tail m)m.
This combines each consecutive pair of rows of m, checking if the first with first element removed is different from the second with second element removed.
The or then combines the checks for all pairs of rows.
1-sum[2|...] converts the output format.

Mathematica, 94 bytes
l=Length;If[l@Flatten[Union/@Table[#~Diagonal~k,{k,-l@#+1,l@#[[1]]-1}]]==l@#+l@#[[1]]-1,1,-1]&

input

{{6, 7, 8, 9, 2}, {4, 6, 7, 8, 9}, {1, 4, 6, 7, 8}, {0, 1, 4, 6,
     7}}

another one based on Stewie Griffin's algorithm
Mathematica, 44 bytes
If[#==#[[;;,1]]~ToeplitzMatrix~#[[1]],1,-1]&

Do you need to define s? Can't you just use # instead?

yes! you are right!

Java 7, 239 233 220 113 bytes
int c(int[][]a){for(int i=a.length,j;i-->1;)for(j=a[0].length;j-->1;)if(a[i][j]!=a[i-1][j-1])return -1;return 1;}

-107 bytes after a tip of using a more efficient algorithm thanks to @Neil.
Explanation:
Try it here.
int c(int[][]a){                // Method with integer-matrix parameter and integer return-type
  for(int i=a.length,j;i-->1;)  //  Loop over the rows (excluding the first)
    for(j=a[0].length;j-->1;)   //   Loop over the columns (excluding the first)
      if(a[i][j]!=a[i-1][j-1])  //    If the current cell doesn't equal the one top-left of it:
        return -1;              //     Return -1
                                //   End of columns loop (implicit / single-line body)
                                //  End of rows loop (implicit / single-line body)
  return 1;                     //  Return 1
}                               // End of method

what is r & c in first function?

@MickeyJack Rows and columns (r = n and c = m if you compare it to the challenge).

Shouldn't you pass the array as a parameter to the function? Also, there is a much more efficient algorithm for this, which would cut your byte count by about 50%.

@Neil Well, it saves 13 bytes to put it on class-level instead, and you'll still have to set the array before calling the method (which can be seen in the TIO). I believe this is an allowed rule regarding code-golf, but I'll see if I can find a meta-post as confirmation. As for the more efficient algorithm: I'm sure there is, but which one are you talking about?

@KevinCruijssen Simply check that all elements not in the first row or column equal the element diagonally up and left from it.

@Neil Ah of course. It's obvious now that you say it, but still brilliant. Thanks, it indeed halved the byte-count.

Ah, you even got to use the --> operator!

@Neil Always a useful operator to use. And I also like the +++ or --- operators in Java, which I unfortunately haven't used in this answer. ;p

Husk, 6 4 bytes
ΛE∂↔

Try it online!
-2 bytes from Zgarb.
My first Husk answer! (Language Of The Month)
Takes matrix as command line argument.
Returns length of longest diagonal for true, and 0 otherwise.
Explanation
ΛE∂↔
   ↔ reverse the rows
  ∂  get antidiagonals
Λ    Check if all elements satisfy condition:
 E   Are all the elements equal?

3 days to learn a completely new golfing language?  Pretty darn good!

Nothing is impossible with the power of well written tutorials and surprisingly convenient builtins @DominicvanEssen

JavaScript (ES6), 65 54 bytes
a=>a.some((b,i)=>i--&&b.some((c,j)=>c-a[i][j-1]))?-1:1

Or using your own trick: a=>a.some(b=>b.some((v,i)=>d[i]-(d[i]=v),d=[,...d]),d=[])?-1:1 (62 bytes)

@Arnauld Thanks, but it turns out I was over-thinking the problem again...

Ruby, 54 bytes
->a,b,m{m.reduce{|x,y|x[0..-2]==y[1,b]?y:[]}.size<=>1}

Exactly as specified, can be golfed more if flexible input/output is accepted.
Explanation:
Iterate on the matrix, and compare each line with the line above, shifted by one to the right. If they are different, use an empty array for the next iteration. At the end, return -1 if the final array is empty, or 1 if it's at least 2 elements (since the smallest possible matrix is 3x3, this is true if all comparisons return true)
Try it online!

Nice use of <=> to compute the result!

How about |(*x,_),y| so you don't need to slice x?

Axiom, 121 bytes
f(m)==(r:=nrows(m);c:=ncols(m);for i in 1..r-1 repeat for j in 1..c-1 repeat if m(i,j)~=m(i+1,j+1)then return false;true)

m has to be a Matrix of some element that allow ~=; ungolf it
f m ==
  r := nrows(m)
  c := ncols(m)
  for i in 1..(r - 1) repeat
    for j in 1..(c - 1) repeat
      if m(i,j)~=m(i + 1,j + 1)     then return(false)
  true

R, 48 bytes
pryr::f(all(x[-1,-1]==x[-nrow(x),-ncol(x)])*2-1)

Try it online!

Retina, 148 bytes
m(1`\d+
$*#
1`#\n\d+\n
@
+`(#*)#@([^#\n]*(#*)\n)(.*)$
$1# $2$1@$4 #$3
@

+`##
# #
+(+s`^(\d+)\b(.*)^\1\b
$1$2#
s`.*^\d.*^\d.*
-1
)%`^[^- ]+ ?

\s+
1

Try it online!
An N×M input matrix
6 7 8 9 2 0
4 6 7 8 9 2
1 4 6 7 8 9
0 1 4 6 7 8

is first converted to an N×(N+M-1) matrix by aligning the diagonals this way:
# # # 6 7 8 9 2 0
# # 4 6 7 8 9 2 #
# 1 4 6 7 8 9 # #
0 1 4 6 7 8 # # #

and then the first column is repeatedly checked to contain a single unique number, and removed if this is so. The matrix is Toeplitz iff the output is blank.

Oh, it doesn't work with negative numbers, gotta fix this :)

PHP, 70 bytes
<?=!preg_match('/\[([\d,]+?),\d+\],\[\d+,(?!\1)/',json_encode($_GET));

Python, 108
r=range
f=lambda x,n,m:all([len(set([x[i][j] for i in r(n) for j in r(m) if j-i==k]))==1 for k in r(1-n,m)])

Not efficient at all since it touches every element n+m times while filtering for diagonals. Then checks if there are more than one unique element per diagonal.

MATL, 11 bytes
T&Xd"@Xz&=v

Try it online!
The straightforward "construct a Toeplitz matrix and check against it" method, that the top few answers use, somehow felt boring to me (and it looks like that would be 1 byte longer anyway). So I went for the "check each diagonal only contains one unique value" method.
T&Xd - Extract the diagonals of the input and create a new matrix with them as columns (padding with zeros as needed)
" - iterate through the columns of that
@Xz - push the iteration variable (the current column), and remove (padding) zeros from it
&= - broadcast equality check - this creates a matrix with all 1s (truthy) if all the remaining values are equal to one another, otherwise the matrix contains some 0s which is falsy
v - concatenate result values together, to create one final result vector which is either truthy (all 1s) or falsey (some 0s)

Japt, 9 bytes
I think this is right.
äÏÅeX¯JÃ×

Try it
äÏÅeX¯JÃ×     :Implicit input of 2D-array
ä             :Consecutive pairs
 Ï            :Reduced by
  Å           :  Slice the first element off the second array
   e          :  Check for equality with
    X         :    First array
     ¯J       :    Slice off the last element
       Ã      :End reduce
        ×     :Reduce by multiplication

Clojure, 94 bytes
#(if(=(+ %2 %3 -1)(count(set(for[Z[zipmap][i r](Z(range)%)[j v](Z(range)r)][(- i j)v]))))1 -1)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
(Can I) Add parentheses to make this true
I saw this recent Puzzling question:
Add parentheses to make this true
And saw that one answer used a Python script to try all possibilities.
Your challenge is, given an expression (as a string) and an integer, is to make a program that can tell whether you can add parens to make the expression equal the integer.
For example, if the expression is 1 + 2 * 3 and the integer is 9, than you can add parens like (1 + 2) * 3, which equals 9, so the output should be truthy. But if the expression is 1 + 2 - 3 * 4 / 5 and the integer is 9999999999999, you can't add any amount of parens to make that equal 9999999999999, so the output should be falsey.
Note that the integer input may be positive or negative, but the expression will only contain positive integers. In fact, the expression will always match (\d+ [+*/-] )+ \d (regex). In other words, no parens, no exponents, just +, -, * and /. Standard operator order (* and /, then + and -).
More test cases:
1 + 2 - 3 * 4 / 9 and -1 -> truthy, ((1 + 2) - (3 * 4)) / 9
10 - 9 * 8 - 7 * 6 - 5 * 4 - 3 * 2 - 2 * 1 and 1, falsey, see linked question
10 + 9 - 8 * 7 + 6 - 5 * 4 + 3 - 2 * 1 and 82 -> truthy, (10 + (9 - 8)) * 7 + (6 - 5) * 4 + 3 - 2 * 1
34 + 3 and 15 -> falsey
1 + 2 + 5 + 7 and 36 -> falsey
1 / 10 * 3 + 3 / 10 * 10 and 6 -> truthy, (1/10*3+3/10)*10

Any questions?
You may output the expression with parenthesis if it is possible, for instance (10 + (9 - 8)) * 7 + (6 - 5) * 4 + 3 - 2 * 1 for the last test case. I would prefer this over just a truthy value, but it is up to you. Using 2(5) for multiplication is not allowed, only *.

/ is float division , right?

@Rod yes, it is.

You should have a test case that requires a non-integer intermediate result to be used.

You should add a test case where division by zero might occur, like 3 / 2 - 1 - 1 and 2 -> 3 / (2 - 1) - 1

Python 2, 286 285 282 bytes
from fractions import*
P=lambda L:[p+[L[i:]]for i in range(len(L))for p in P(L[:i])]or[L]
x,y=input()
x=x.split()
for p in P(['Fraction(%s)'%e for e in x[::2]]):
 try:print 1/(eval(''.join(sum(zip(eval(`p`.replace("['","'(").replace("']",")'")),x[1::2]+[0]),())[:-1]))==y)
 except:0

Try it online
Explanation:
This version will print all of the working expressions (with the Fraction objects).
from fractions import*
# Sublist Partitions (ref 1)
P=lambda L:[p+[L[i:]]for i in range(len(L))for p in P(L[:i])]or[L]
x,y=input()
x=x.split()
# Convert all numbers to Fractions for division to work
n=['Fraction(%s)'%e for e in x[::2]]
# Operators
o=x[1::2]
# Try each partition
for p in P(n):
    # Move parens to be inside strings
    n=eval(`p`.replace("['","'(").replace("']",")'"))
    # Alternate numbers and operators (ref 2)
    x=''.join(sum(zip(n,o+[0]),())[:-1])
    # Prevent division by zero errors
    try:
        # Evaluate and check equality
        if eval(x)==y:print x
    except:0

Try it online
References:

Partitioning function

Alternating zip

Saved 3 bytes thanks to Felipe Nardi Batista

1- Can you use python3 (/ is float division) and drop all fractions uses? 2 - What about divisions by 0?

@Rod No, you can't. Float division is the reason it's required.

What's the reason then?

oh, rounding issues

I fixed the division by zero problem. It still worked for any example where the solution came before the division by zero, but I did find a test case that broke it. It's the last test case in my test suite.

golfed a bit

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Generate all Sublist Partitions
Given a non-empty list of integers, output every possible partitioning of the list where each partition is a non-empty sublist.
So for the list [1, 2, 3, 4] the result is:
[[1, 2, 3, 4]]
[[1, 2, 3], [4]]
[[1, 2], [3, 4]]
[[1, 2], [3], [4]]
[[1], [2, 3, 4]]
[[1], [2, 3], [4]]
[[1], [2], [3, 4]]
[[1], [2], [3], [4]]

The order of the lists in the output does not matter, so [[1, 2, 3, 4]] could be first, last, or wherever. The order of the elements must be preserved.
This is code-golf, so shortest answer wins.

Related: Partition a list!

Can we omit the surrounding [...] in the output format? (As long as partitions are clearly separated, e.g. by linefeeds.)

Input and output formats are flexible, but they should be the similar. So if the input list has its elements on one line, the output lists should, too.

That's not what I mean. Have a look at the Bash answer. It uses : as the list separator but in the output, partitions themselves aren't wrapped in an additional pair of [...].

Or, asked differently: in your example format in the challenge, can I drop the first [ and last ] from each line?

Is it okay, if my output lists are inside another list? like [[[1, 2]], [[1], [2]]...]

@mbomb007 It's essentially what the Bash answer does (just using : for , and space for linefeed). And it would save 8 bytes or so in Retina, but I can't tell you whether to allow it or not.

@MartinEnder Sure, I guess it's fine.

@mbomb007 "No."? You mean we can't just return a list containing all partitions? o_O (I believe that's what all the non-string-processing answers do.)

I would argue (of course I would - I'm biased) that the I/O formats in my answer are fine, because I don't think there are any ambiguities.  However I will happily take whatever decision comes down...

@MartinEnder I couldn't tell what the user was asking. Yes that's okay.

Same question as tips

Jelly, 2 bytes
ŒṖ

Try it online!

Retina, 27 19 bytes
Byte count assumes ISO 8859-1 encoding.
+1%`,
;$'¶$`];[
;
,

Try it online!
Explanation
Of course this computes all partitions using string processing. The basic idea is that we can generate all partitions by deciding for each , individually whether or not we want to split the list there. This kind of stuff can be done in Retina by matching each , in turn and using a replacement which gives both possible outputs.
The input acts as the base case: the partition where all elements are still in a single list.
+1%`,
;$'¶$`];[

Now we repeatedly (+) match the first (1) comma (,), on each line (%) (treating that line as a separate string, which is relevant for $' and ``$1 ` in the substitution).
That comma gets replaced with:
;   A semicolon. This is just a stand-in for the comma, so we know we've already
    processed it and it won't be substituted again by the next iteration.
$'  Everything after the match. This completes the first (unchanged) version of
    the current line.
¶   A linefeed. Since the next iteration will scan for all lines again, this doubles
    the number of strings we're working with.
$`  Everything before the match. This completes the second (split) version of
    the current line.
];[ A semicolon around which we split the list.

Remember that everything in front of the match and after the match remains in the string anyway, so the full result is actually $`;$'¶$`];[$' which explains why we insert the suffix and prefix in that order.
This loop stops once all commas are gone.
;
,

Finally, replace the semicolons with commas again to match the input format.

Pure Bash, 28
eval echo [${1//:/{:,]:[\}}]

Here, lists are colon-separated, and contained in square brackets.  For example in the question, the input list would be 1:2:3:4 and the output is:
[1:2:3:4] [1:2:3]:[4] [1:2]:[3:4] [1:2]:[3]:[4] [1]:[2:3:4] [1]:[2:3]:[4] [1]:[2]:[3:4] [1]:[2]:[3]:[4]

Try it online.

${1//:/REPLACEMENT} replaces the colons in $1 with {:,]:[\}
This generates a brace expansion like [1{:,]:[}2{:,]:[}3{:,]:[}4]
The eval (and careful \ escapes) causes the brace expansion to happen last and give the desired result.

If it is necessary to exactly match the given [[ , , ...]] format, then we can do this instead:
Pure Bash, 47
eval printf '%s\\n' ${1//, /{\\,\\ ,]\\,\\ [\}}

Try it online.

05AB1E, 5 bytes
Œæʒ˜Q

Try it online!
Œæʒ˜Q  Main link. Argument l
Œ      Get all sublists of l
 æ     Powerset of those lists
  ʒ˜Q  Filter: Keep the lists that when flattened equal the input

Wow, this is a very neat answer!

@Adnan thanks, I'm also quite happy with it. Although it is everything but efficient :)

Nice answer when there wasn't a builtin yet, +1 from me! Just leaving this for anyone else coming here in the future, but 05AB1E now has a 2-bytes builtin to get all partitions: .œ: Try it online.

Pyth, 2 bytes
./

With input [1, 2, 3, 4] (for instance).
Explanation: ./ is the partition operator. It returns all divisions of the input list into disjoint sub-lists. The input is implicitly fed to the program.
Test it online!

Python 3, 82 72 66 bytes
f=lambda l:[k+[l[i:]]for i in range(len(l))for k in f(l[:i])]or[l]

Try it online!
-5 bytes thanks to @JonathanAllan

Oh my, I can't ^v again :( I actually tried something like this and it didn't work, I must've gone wrong somewhere.

...in which case lop off 5 more

@JonathanAllan thanks a lot! I could save another byte by reusing the l in the end

This solution already exists here. I messaged @feersum in TNB after posting the question, so that he'd have a chance to post it.

I didn't mean that you should undo it, I just meant that you beat him to it. It's your choice, of course.

Haskell, 59 55 49 bytes
p[x]=[[[x]]]
p(x:r)=do a:b<-p r;[(x:a):b,[x]:a:b]

Try it online!
Recursive solution. Usage example: p [1,2,3] returns [[[1,2,3]],[[1,2],[3]],[[1],[2,3]],[[1],[2],[3]]].
-6 bytes thanks to xnor!

You can write the second line shorter with do notation: do a:b<-p r;[(x:a):b,[x]:a:b] (this changes the order of the lists).

Also, <*> does exactly what you want [\(a:b)->(x:a):b,([x]:)]<*>p r, though it's longer than do because the first lambda seems to need a pattern match.

J, 42 bytes
<@(</."1)~<:@#_&(][:;<@(,~"{~0 1+>./)"1)0:

Generates all sublist partitons by creating the keys for partition sublists of length 1 and iterating to the length of the input list. Each partition sublist is then formed by selecting from the keys.
For example, here is the process of creating the keys for a length 4 list.

Try it online!

Brachylog, 2 bytes
~c

Try it online!
Function submission that produces output via acting as a generator. (The TIO link contains extra code to make this into a full program, for testing purposes.)
Incidentally, although not technically a builtin, this is so commonly used in Brachylog that a) it probably deserves a single-byte representation, and b) the c builtin can take a parameter to make assertions about its input (whereas with most builtins, a parameter talks about how to produce the output).
Explanation
~c
~     Find a value with the following properties:
 c      concatenating its elements produces {the input}

J, 26 24 bytes
<@(<;.1)~2#:@(+i.)@^<:@#

Try it online!

APL, 26 bytes
{⊂∘⍵¨1,¨↓⍉(X⍴2)⊤⍳2*X←⍴1↓⍵}

Test:
      {⊂∘⍵¨1,¨↓⍉(X⍴2)⊤⍳2*X←⍴1↓⍵} 1 2 3 4
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│┌─────┬─┐│┌───┬───┐│┌───┬─┬─┐│┌─┬─────┐│┌─┬───┬─┐│┌─┬─┬───┐│┌─┬─┬─┬─┐│┌───────┐│
││1 2 3│4│││1 2│3 4│││1 2│3│4│││1│2 3 4│││1│2 3│4│││1│2│3 4│││1│2│3│4│││1 2 3 4││
│└─────┴─┘│└───┴───┘│└───┴─┴─┘│└─┴─────┘│└─┴───┴─┘│└─┴─┴───┘│└─┴─┴─┴─┘│└───────┘│
└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘

Explanation:

X←⍴1↓⍵: X is the length of ⍵ (the input list) with its first element dropped
⍳2*X: the numbers [1..2^X]
(X⍴2)⊤: base-2 representation of those numbers, with X positions (i.e. X itself will wrap around to 0).
↓⍉: rotate the matrix and split it along the lines (⊤ gives as a result a matrix with the numbers along the columns), giving an array of bit vectors
1,¨: prepend a 1 to each bit vector.
⊂∘⍵¨: for each bit vector, split ⍵ at each 1.

Haskell, 45 bytes
foldr(\h t->map([h]:)t++[(h:y):z|y:z<-t])[[]]

Try it online!
I found this solution a while back in thinking about a Haskell tip.

Python, 90 bytes
outgolfed by ovs (making something I thought I'd tried work :p)
def f(a):r=[[a]];i=len(a)-1;exec("for s in f(a[:i]):s+=[a[i:]];r+=[s]\ni-=1\n"*i);return r

A recursive function which builds up the list of partitions from slices of the input with the tail reached when the slices are of length 1.
Try it online!
The exec saves 4 bytes over a while or 3 over a for loop (below) since it means only two \ns rather than two levels of indentation, allowing the whole function to be on one line (while the order of slicing does not matter).
def f(a):
 r=[[a]]
 for i in range(1,len(a)):
  for s in f(a[:i]):s+=[a[i:]];r+=[s]
 return r

Python 3, 67 bytes
f=lambda x,n=1:x[n:]and[y+[x[n:]]for y in f(x[:n])]+f(x,n+1)or[[x]]

Try it online!

Haskell, 59 bytes
x#[]=[[[x]]]
x#(a:b)=[(x:a):b,[x]:a:b]
foldr((=<<).(#))[[]]

Ruby, 62 57 bytes
->l{(0..2**l.size).map{|x|l.chunk{1&x/=2}.map &:last}|[]}

Try it online!
How it works:

The number of partitions is 2^(n-1): I iterate on binary numbers in that range, take the groups of zeros and ones and map them as subsets of the initial list.
Instead of fiddling with the range, I make it double and discard duplicates at the end. Now I can also discard the first binary digit and make the chunk function shorter.

Curry (PAKCS), 32 bytes
f(a:b++c:d)=(a:b):f(c:d)
f a=[a]

Try it online!
Curry supports non-deterministic operations which can return different values for the same input. This is a non-deterministic function whose different return values are the all sublist partitions.

APL(Dyalog Unicode), 15 bytes SBCS
Extracted from this answer of mine. Assumes index origin 0.
{⊂∘⍵¨~,⍳1+×⍳≢⍵}

Try it on APLgolf!

Vyxal, 7 bytes
ÞSṗ'f⁰⁼

Try it Online!
well it has a 2-byte builtin øṖ but it doesn't return all of the partitions...
How?
ÞSṗ'f⁰⁼
ÞS      # Get all sublists of the (implicit) input
  ṗ     # Powerset
   '    # Filter for:
    f   #  Flatten
     ⁰⁼ #  Is it equal to the input? (non-vectorizing)

JavaScript (ES6), 87 bytes
([e,...a],b=[],c=[e],d=[...b,c])=>1/a[0]?[...f(a,b,[...c,a[0]]),...f(a,d,[a[0]])]:[d]

Explanation: b is the list of previous sublists, c is the current sublist, (which starts off as the first element of the array, since that must be in the first sublist) while d is the list of all sublists. The rest of the array elements are then recursively processed. In each case there are two options: either the next element is appended to the current sublist, or the current sublist is completed and the next element starts a new sublist. The recursive results are then concatenated together. When the array is exhausted, the list of list of all sublists is the result.

APL(NARS) 38 char, 76 bytes
{k←↑⍴⍵⋄x←11 1‼k k⋄y←⍵⋄∪{x[⍵;]⊂y}¨⍳↑⍴x}

this use the Nars function 11 1‼k k but is very slow, unusable for arg array of 9 elements already...
  P3←{k←↑⍴⍵⋄x←11 1‼k k⋄y←⍵⋄∪{x[⍵;]⊂y}¨⍳↑⍴x}

  ⍴∘P3¨{1..⍵}¨⍳8
1  2  4  8  16  32  64  128
  P3 'abcd'
abcd    abc d    ab cd    a bcd    ab c d    a bc d    a b cd    a b c d

this below is the function that not use the built in:
r←h w;k;i
   r←⊂,⊂w⋄k←↑⍴w⋄i←1⋄→B
A: r←r,(⊂⊂,i↑w),¨h i↓w⋄i+←1
B: →A×⍳i<k

  h 'abcd'
abcd    a bcd    a b cd    a b c d    a bc d    ab cd    ab c d    abc d
  ⍴∘h¨{1..⍵}¨⍳8
2  4  8  16  32  64  128

we se the type each result:
  o h ,1
┌──────┐
│┌1───┐│
││┌1─┐││
│││ 1│││
││└~─┘2│
│└∊───┘3
└∊─────┘
  o h 1 2
┌2───────────────────┐
│┌1─────┐ ┌2────────┐│
││┌2───┐│ │┌1─┐ ┌1─┐││
│││ 1 2││ ││ 1│ │ 2│││
││└~───┘2 │└~─┘ └~─┘2│
│└∊─────┘ └∊────────┘3
└∊───────────────────┘

I don't know how it works, it is only heuristic try...
Possible I make some error; both the functions build the partitions of the list whatever input and not only 1 2 ... n.

Axiom, 251 bytes
C==>concat;A==>List Any;px(a:A):A==(k:=#a;r:=copy[a];k<=1=>r;i:=1;repeat(i>=k=>break;x:=a.(1..i);y:=a.((i+1)..k);z:=px(y);t:=[x,z.1];for j in 2..#z repeat(w:=(z.j)::A;m:=#w;v:=[x];for q in 1..m repeat v:=C(v,w.q);t:=C(t,[v]));r:=C(r,copy t);i:=i+1);r)

If someone find something better...ungof and test:
pp(a:List Any):List Any==
  k:=#a;r:=copy[a];k<=1=>r;i:=1
  repeat
    i>=k=>break
    x:=a.(1..i);y:=a.((i+1)..k);z:=pp(y);
    t:=[x,z.1]
    for j in 2..#z repeat
           w:=(z.j)::List Any
           m:=#w; v:=[x]
           for q in 1..m repeat
                       v:=concat(v,w.q);
           t:=concat(t,[v])
    r:=concat(r,copy t);
    i:=i+1
  r

(7) -> px []
 (7)  [[]]
                                                           Type: List Any
(8) -> px [1]
 (8)  [[1]]
                                                           Type: List Any
(9) -> px [1,2]
 (9)  [[1,2],[[1],[2]]]
                                                           Type: List Any
(10) -> px [1,2,3]
 (10)  [[1,2,3],[[1],[2,3]],[[1],[2],[3]],[[1,2],[3]]]
                                                           Type: List Any
(11) -> px [1,2,3,4,5,6]
 (11)
[[1,2,3,4,5,6], [[1],[2,3,4,5,6]], [[1],[2],[3,4,5,6]],
 [[1],[2],[3],[4,5,6]], [[1],[2],[3],[4],[5,6]], [[1],[2],[3],[4],[5],[6]],
 [[1],[2],[3],[4,5],[6]], [[1],[2],[3,4],[5,6]], [[1],[2],[3,4],[5],[6]],
 [[1],[2],[3,4,5],[6]], [[1],[2,3],[4,5,6]], [[1],[2,3],[4],[5,6]],
 [[1],[2,3],[4],[5],[6]], [[1],[2,3],[4,5],[6]], [[1],[2,3,4],[5,6]],
 [[1],[2,3,4],[5],[6]], [[1],[2,3,4,5],[6]], [[1,2],[3,4,5,6]],
 [[1,2],[3],[4,5,6]], [[1,2],[3],[4],[5,6]], [[1,2],[3],[4],[5],[6]],
 [[1,2],[3],[4,5],[6]], [[1,2],[3,4],[5,6]], [[1,2],[3,4],[5],[6]],
 [[1,2],[3,4,5],[6]], [[1,2,3],[4,5,6]], [[1,2,3],[4],[5,6]],
 [[1,2,3],[4],[5],[6]], [[1,2,3],[4,5],[6]], [[1,2,3,4],[5,6]],
 [[1,2,3,4],[5],[6]], [[1,2,3,4,5],[6]]]
                                                           Type: List Any
(12) -> [[i,#px i] for i in [[],[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5,6]] ]
 (12)
[[[],1],[[1],1],[[1,2],2],[[1,2,3],4],[[1,2,3,4],8],[[1,2,3,4,5,6],32]]
                                                      Type: List List Any
(13) -> [#px(i) for i in [[],[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5,6]] ]
 (13)  [1,1,2,4,8,32]
                                            Type: List NonNegativeInteger

If this is too much space say that and I remove examples...

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Sum of first row and column, then second row and column ... and so on
Take a non-empty matrix / numeric array containing positive integers as input. Return, in this order, the sums of the first row and column, then the second row and column and continue until there aren't any more rows or columns.
Suppose the input is:
2   10   10    2    4
9    7    7    2    9
1    7    6    2    4
7    1    4    8    9

Then the output should be:
45, 33, 16, 17

Because: 2+9+1+7+10+10+2+4=45, 7+7+1+7+2+9=33, 6+4+2+4=16, 8+9=17.
Test cases:
Test cases are on the following format:
Input
---
Output

5
---
5
..........

1  4
----
5
..........

7
2
---
9
..........

 8    3    7   10    3    7   10    1
10    7    5    8    4    3    3    1
 1    6    4    1    3    6   10    1
 2    3    8    2    8    3    4    1
---
62   40   33   18
..........

30    39    48     1    10    19    28
38    47     7     9    18    27    29
46     6     8    17    26    35    37
 5    14    16    25    34    36    45
13    15    24    33    42    44     4
21    23    32    41    43     3    12
22    31    40    49     2    11    20
---
320  226   235   263   135    26    20
..........

7   10    1
4    4    2
6    3    4
1    4   10
5    7    6
---
34   20   20

As arrays:
[[5]]
[[1,4]]
[[7],[2]]
[[8,3,7,10,3,7,10,1],[10,7,5,8,4,3,3,1],[1,6,4,1,3,6,10,1],[2,3,8,2,8,3,4,1]]
[[30,39,48,1,10,19,28],[38,47,7,9,18,27,29],[46,6,8,17,26,35,37],[5,14,16,25,34,36,45],[13,15,24,33,42,44,4],[21,23,32,41,43,3,12],[22,31,40,49,2,11,20]]
[[7,10,1],[4,4,2],[6,3,4],[1,4,10],[5,7,6]]

This is code-golf so the shortest solution in each language wins.

Would it be acceptable to print the sums and then print zeros forever?

@JonathanAllan, printing zeros forever is a bit of a stretch, so I think I must say no to that one.

Retina program to convert from pretty examples to Python arrays.

Looking at the examples. the task desciption is wrong. The second column in first example is 10,7,7,1, the second row is 9,7,7,2,9 and the sum is 59. And so on

@edc65 Looking at the examples, it appears that numbers used in previous calculations aren't reused. Or another way, when considering nth row, only use values from the nth column on, and ignore those in columns 1 through n-1.

@edc65 And rereading your comment, I see you are just asking the description be updated, not the examples, so nevermind :)

Does the input have to be taken via STDIN or can it be a variable passed to a function?

@Arc676 Standard io rules. Function arguments are one of the accepted input methods.

MATL, 16 bytes
&n:w:!XlX:GX:1XQ

Try it online! Or verify all test cases.
Explanation
Consider, as an example, the input
2   10   10    2    4
9    7    7    2    9
1    7    6    2    4
7    1    4    8    9

The code &n:w:!Xl builds the column vector [1; 2; 3; 4] and the row vector [1 2 3 4 5]. Then Xl computes the minimum element-wise with broadcast, which gives the matrix
1 1 1 1 1
1 2 2 2 2
1 2 3 3 3
1 2 3 4 4

X: linearizes this matrix (in column-major order) into the column vector [1; 1; 1; 1; 1; 2; 2; ... ; 4]. This vector and the linearized input matrix, obtained as GX:, are passed as inputs to the accumarray(... @sum) function, or 1XQ. This computes the sum of the second input grouped by values of the first input.

Jelly, 3 bytes
ŒDS

Try it online!
How it works
ŒDS

ŒD   diagonals
  S  vectorized sum

CJam, 23 18 bytes
{[{(:+\z}h;]2/::+}

Anonymous block expecting the argument on the stack and leaving the result on the stack.
Try it online!
Explanation
[      e# Begin working in an array.
 {     e#  Do:
  (:+  e#   Remove the first row of the matrix and sum it.
  \z   e#   Bring the matrix back to the top and transpose it.
 }h    e#  While the matrix is non-empty.
 ;     e#  Discard the remaining empty matrix.
]      e# Close the array.
2/     e# Split it into consecutive pairs of elements (possibly with a singleton on the end).
::+    e# Sum each pair.

Isn't this a bit "cheating"? I mean, you are not counting the input and output code in the byte count. With both input and output it is only 1 byte longer: q~[{(:+\z}h;]2/::+p

@FrodCube It is allowed by meta consensus.

Actually, technically, it would be the same length as a full program, since I could omit the opening [. But as a block I think I need it because it needs to not capture the entire stack below as well.

05AB1E, 14 11 bytes
[ćOˆøŽ]¯2ôO

Try it online!
Explanation
[   Ž ]       # loop until stack is empty
 ć            # extract the head
  Oˆ          # sum and add to global list
     ø        # transpose
       ¯      # push global list
        2ô    # split into pairs
          O   # sum each pair

JavaScript (ES6), 60 bytes
a=>a.map((b,y)=>b.map((c,x)=>r[x=x<y?x:y]=~~r[x]+c),r=[])&&r

Naive solution, may be a better way.

oK, 19 18 bytes
-1 byte thanks to coltim.
1_--':+//'(1_+1_)\

Try it online!
Explanation:
          (1_+1_)   /a function that strips the top and leftmost rows of a matrix
                 \  /apply this function as many times as possible,
                    /    saving each result as one element of a list
      +//'          /for each result, get the sum of all numbers
  --':              /subtract every right value from every left value
1_                  /remove the extra 0

I think you can do 1_--': instead of |1_-':| to save a byte.

Haskell, 50 49 bytes
f(a@(_:_):b)=sum(a++map(!!0)b):f(tail<$>b)
f _=[]

Try it online!
If there's at least one row with at least one element, the result is the sum of the first row and the heads of all other rows followed by a recursive call with the tails of all other rows. In all other cases, the result is the empty list.
Edit:  Ørjan Johansen saved a byte. Thanks!

Octave, 64 52 bytes
Thanks to @StewieGriffin for saving 1 byte!
@(x)accumarray(min((1:size(x))',1:rows(x'))(:),x(:))

This defines an anonymous function.
Try it online!
Explanation
The code is similar to my MATL answer (see explanation there).
Two bytes have been saved using 1:size(x) instead of 1:size(x,1), exploiting the fact that 1:[a b] behaves the same as 1:a. Also, one byte has been saved using 1:rows(x') instead of 1:size(x,2), thanks to Stewie.

Octave, 63 60 bytes
@(A)(@(L)sum(triu(A,1)')(L)+sum(tril(A))(L))(1:min(size(A)))

Try it online!
The answer for this matrix:
2   10   10    2    4
9    7    7    2    9
1    7    6    2    4
7    1    4    8    9

is the vector of row sums of its upper triangular part:
0   10   10    2    4
0    0    7    2    9
0    0    0    2    4
0    0    0    0    9

plus the vector of column sums of its lower triangular part:
2    0    0    0    0
9    7    0    0    0
1    7    6    0    0
7    1    4    8    0

which is precisely what my answer is computing.

Mathematica, 60 bytes
Inspired by Luis Mendo's MATL answer.
Pick[#,Min~Array~d,n]~Total~2~Table~{n,Min[d=Dimensions@#]}&

Explanation: Min~Array~Dimensions@# constructs a matrix like the following:
1 1 1 1 1
1 2 2 2 2
1 2 3 3 3
1 2 3 4 4

Then Pick[#,...,n]~Total~2 picks out the entries of the input matrix corresponding to the number n in the weird matrix above, and sums them. Finally ...~Table~{n,Min[d=Dimensions@#]} iterates over n.
This is 1 byte shorter than the naïve approach:
{#[[n,n;;]],#[[n+1;;,n]]}~Total~2~Table~{n,Min@Dimensions@#}&

R, 63 60 59 57 56 bytes
Edit: -4 bytes, and then -2, and then -1 more, thanks to Robin Ryder
function(m,`+`=sum)while(+m)show(m+-{m=m[-1,-1,drop=F]})

Try it online!
Repeatedly removes the first row & column (using negative indexing: m[-1,-1] is m without the first row & column), prints the difference between the sum of m and this, and keeps going if there's anything left.
R is very well-suited to this type of vectorized matrix operation, so this approach comes-out significantly shorter than a looping approach.

62?

@Giuseppe - that will print a final 0 if the matrix has more cols than rows, because the rows will run-out first: try it.

Gotcha. Kinda suspected as much but didn't think it all the way through.

61 bytes

Additionally, while(m|1) seems to work; the function errors after printing the correct output. And you can save 1 more byte with show instead of print. ;-)

@RobinRyder - I love the {} trick!  Really nice!

I've just noticed that the challenge specs state the input will be positive, so you can use while(m) for 52 bytes. If you dislike the function erroring after printing the correct output, you can add a try for 57.

@RobinRyder - Well spotted!  Thanks for pointing that out!  I've amended (with credit), but gone for a 57-byte non-erroring version, after searching for "error" in Meta, and finding "Errors during Function Call ... that aborts the entire program... should not be allowed"...

In that case, you can use a shorthand for sum for 56.

@RobinRyder - Thanks again!

Julia, 62 bytes
f=x->1∈size(x)?sum(x):(n=f(x[2:end,2:end]);[sum(x)-sum(n);n])

Works recursively by summing up the whole matrix and then subtracting off the sum of the next block. Probably not the most effective approach, but nicely intuitive.

05AB1E, 16 bytes
[ćOsø.g<NQ#])2ôO

Try it online! or Try all tests
[                # Start loop
 ć               # Extract first element
  O              # Sum
   sø            # Transpose the input array (without the first N rows and columns)
     .g<NQ       # Push if (stack height - 1 == loop count)
          #]     # If they were equal break
            )2ô  # Break stack into chunks of 2
               O # Sum the chunks

Java 10, 248 245 227 223 219 218 bytes
a->{int l=a.length,L=a[0].length,b[][]=new int[l][L],i,j,x=0,s;for(;++x<l|x<L;)for(i=l;i-->x;)for(j=L;j-->x;)b[i][j]=x;var r="";for(;x-->0;r=s>0?s+" "+r:r)for(s=0,i=l*L;i-->0;)s+=b[i/L][i%L]==x?a[i/L][i%L]:0;return r;}

-8 bytes thanks to @ceilingcat
Try it online.
General explanation:
Let's say the input array has dimensions of 4x6. The first part of the code will create a temp matrix and fills it as follows:
// 1. Fill the entire array with 0:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

// 2. Overwrite the inner part with 1 (excluding the first row & column):
0 0 0 0 0 0
0 1 1 1 1 1
0 1 1 1 1 1
0 1 1 1 1 1

// #. Etc. until we are left with this:
0 0 0 0 0 0
0 1 1 1 1 1
0 1 2 2 2 2
0 1 2 3 3 3

And in the second part of the code it will loop over this temp matrix, and sums all values of the input-matrix for each of the distinct numbers in the temp matrix.
Explanation of the code:
a->{                       // Method with int-matrix parameter and String return-type
  int l=a.length,          //  Amount of rows
      L=a[0].length,       //  Amount of columns
      b[][]=new int[l][L], //  New temp matrix to fill as explained above
      i,j,x=0,s;           //  Some temp integers

                           //This is the first part of the code mentioned above:
  for(;++x<l|x<L;)         //  Loop `x` over the rows or columns (whichever is larger):
    for(i=l;i-->x;)        //   Inner loop over the rows:
      for(j=L;j-->x;)      //    Inner loop over the cells of this row:
        b[i][j]=x;         //     Set the value of the current cell to `x`

                           //This is the second part of the code mentioned above:
  var r="";                //  Result-String, starting empty
  for(;x-->0               //  Loop over the unique numbers in the temp matrix:
      ;                    //     After every iteration:
       r=s>0?s+" "+r:r)    //    If the sum is larger than 0: append it
    for(s=0,               //   Reset the sum to 0
        i=l*L;i-->0;)      //   Inner loop over the cells:
      s+=b[i/L][i%L]==x?   //    If the current cell of the temp-matrix contains `x`:
          a[i/L][i%L]:0;   //     Add the input's value at this position to the sum
  return r;}               //  Return the result-String

Vim, 66, 52 bytes
qq^f j<C-v>}dkV}Jo<esc>p@qq@q:%s/\v> +</+/g|%norm C<C-v><C-r>=<C-v><C-r>"<C-v><cr><cr>

Try it online!
The wrong tool for the job...

Perl 6, 63 55 bytes
{($_ Z [Z] $_).kv.map(->\a,\b{b.flatmap(*[a..*]).sum -b[0;a]})}
{($_ Z [Z] .skip).kv.map({$^b.flatmap(*[$^a..*]).sum})}

$_ is the matrix input to the anonymous function
.skip is the input matrix with its first row removed
[Z] .skip is the transpose of the input matrix with its first row removed; that is, the transpose without its first column
$_  Z [Z] .skip zips the input matrix with its transpose-sans-first-column, producing a list ((first-row, first-column-sans-first-element), (second-row, second-column-sans-first-element), ...)
.kv prefixes each pair with its index
map({...}) maps over the the pairs, using a function which takes its first argument (the index) in $^a and its second (the row/column pair) in $^b
$^b.flatmap(*[$^a..*]).sum strips off the first $^a elements of each row/column pair, then sums all the remaining elements

After some thought I realized that stripping off the first column of the transpose before zipping was equivalent to subtracting the doubly-contributing diagonal elements, as in my first solution.  That let me delete that subtraction, and using each argument to the mapping function only once made the {...$^a...$^b...} method of passing arguments to an anonymous function more efficient than the original -> \a, \b {...a...b...}.

Pyth, 16 15 bytes
.es+>b+1k>@CQkk

Takes a python-style array of arrays of numbers, returns an array of sums.
Try it!
Explanation
.es+>b+1k>@CQkk
.e             Q  # Enumerated map over the implicit input (Q); indices k, rows b
           CQ     # Take the transpose
          @  k    # The kth column
         >    k   # cut off the first k elements
    >b+1k         # cut off the first k+1 elements of the rows, so (k,k) isn't counted twice
  s+              # add the row and column together and sum

Jelly, 10 bytes
Ḣ;Ḣ€SṄȧßS¿

A full program that prints the values
Try it online!
How?
Ḣ;Ḣ€SṄȧßF¿ - Main link: list of lists a
Ḣ          - head a (pop the first row and yield it, modifying a)
  Ḣ€       - head €ach (do the same for each of the remaining rows)
 ;         - concatenate
    S      - sum (adds up the list that contains the top row and left column)
     Ṅ     - print that plus a linefeed and yield the result
         ¿ - while:
           - ... condition:
        F  -   flatten (a list of empty lists flattens to an empty list which is falsey)
           - ... body:
       ß   -   call this link with the same arity (as a monad) i.e. Main(modified a)
      ȧ    - logical and (when the sum is non-zero gets the modified a to feed back in)

Python + NumPy, 75 66 bytes
Input is a 2D numpy array.
lambda L:[sum(L[i,i:])+sum(L[i+1:,i])for i in range(min(L.shape))]

Try it online
-9 bytes by Black Owl Kai

len(L),len(L[0]) can be shortened to L.shape, saving 9 bytes

Wow, an old one. Thanks.

Python 2, 97 bytes
f=lambda m:[reduce(lambda x,y:x+y[i],m[i:],sum(m[i][i+1:]))for i in range(min(len(m),len(m[0])))]

Try it online!

There is a good deal of whitespace in this answer that could be removed.

@WheatWizard Thanks! Reduced my answer by 4 bytes :)

GNU APL 1.7, 123 bytes
Solution requires two functions: one creates a global array and the calls the second, which recursively appends the sums to that array.
∇f N
R←⍬
g N
R
∇
∇g N
→2+2×0∈⍴N
R←R,(+/N[1;])+(+/N[;1])-N[1;1]
g N[1↓⍳1⊃⍴N;1↓⍳2⊃⍴N]
∇

∇ begins and ends the function. Both f and g take tables as arguments (essentially 2D arrays). These can be created with X←rows cols ⍴ 1 2 3 4....
R←⍬ assigns an empty vector to global variable R.
g N calls the second function with the same argument given to the first.
⍴N gives the dimensions of N; when one of the dimensions is zero, there are no more rows/columns to add up. 0∈⍴N returns 1 if there is a zero in the dimensions. →2+2×0∈⍴N branches to line number 2 plus 2 times the return value of the ∈ function: if there is no zero, ∈ returns 0 and the function branches to line 2 (the next line). If there is a zero, ∈ returns 1 and the function branches to line 4 (the end of the function, so return essentially).
/ is the reduce operator. It applies the left argument, which is an operator (+) to every element in the list given as the right argument. N[1;] gives the entire first row of the table and N[;1] gives the first column. (+/N[1;])+(+/N[;1])-N[1;1] sums the first row and column and subtracts the value in the upper left corner because it gets added both in the column sum and the row sum. R←R,... appends the newly calculated value to the global vector R.
The function then calls itself (recurse until no more rows or columns). The ⊃ pick operator obtains the specified element from the list. 1⊃⍴N gives the number of rows, 2⊃⍴N the number of columns. ⍳ gives all numbers from 1 to the specified number. The ↓ drop operator removes elements from the beginning of the list. If you give multiple indices when accessing elements from a table or vector (e.g. N[1 2 3]), APL accesses each one. Therefore, 1↓⍳1⊃⍴N gives the indices of each row excluding the first one (2, 3, 4, ..., N) and 1↓⍳2⊃⍴N gives a similar vector but for the columns. g N[1↓⍳1⊃⍴N;1↓⍳2⊃⍴N] calls the function again but without the first row or column.

Clojure, 98 bytes
#(vals(apply merge-with +(sorted-map)(mapcat(fn[i r](map(fn[j v]{(min i j)v})(range)r))(range)%)))

Iterates over the input with row and column indexes (in a very verbose manner), creates a hash-map with the minimum of i and j as the key, merges hash-maps with + into a sorted-map, returns values.

R, 102 bytes
function(x)`for`(i,1:min(r<-nrow(x),k<-ncol(x)),{dput(sum(x[,1],x[1,-1]));x=matrix(x[-1,-1],r-i,k-i)})

returns an anonymous function; prints the results to the console, with a trailing newline. I probably need a different approach.
Iterates over the minimum of the rows and columns; prints the sum of x[,1] (the first column) and x[1,-1] the first row except for the first entry, then sets x to be a matrix equal to x[-1,-1] (i.e., x excluding its first row and column). Unfortunately, simply setting x=x[-1,-1] causes it to fail in the case of a square matrix, because when x is 2x2, the subsetting returns a vector rather than a matrix.
Try it online!

Re: "I probably need a different approach" - yes.  63 bytes without looping...

@DominicvanEssen lol I've gotten much better at golfing in the last 3 years.

Java 7, 280 276 bytes
import java.util.*;String d(ArrayList l){String r="";for(;l.size()>0&&((List)l.get(0)).size()>0;l.remove(0))r+=s(l)+" ";return r;}int s(List<ArrayList<Integer>>l){int s=0,L=l.size(),i=1;for(;l.get(0).size()>0;s+=l.get(0).remove(0));for(;i<L;s+=l.get(i++).remove(0));return s;}

Try it here.
Alternative approach compared to my previous answer with arrays, which is still shorter than this one in the end (so I kinda wasted time trying this alternative approach).
General explanation:
Inspiration from @Riley's amazing 05AB1E answer
This answer uses a List and after every sum is calculated it removes the first column and first row from the List-matrix, like this:
// Starting matrix:
7 10 1
4 4  2
6 3  4
1 4  10
5 7  6

// After first iteration (result so far: "34 "):
4  2
3  4
4  10
7  6

// After second iteration (result so far: "34 20 "):
4
10
6

// After last iteration, result: "34 20 20 "

Explanation of the code:
import java.util.*;                // Required import for List and ArrayList

String d(ArrayList l){             //  Method with ArrayList parameter and String return-type
  String r="";                     //  Return-String
  for(;l.size()>0&&((List)l.get(0)).size()>0;
                                   //  Loop as long as the list still contains anything
       l.remove(0))                //  And remove the first row after every iteration
    r+=s(l)+" ";                   //   Append the sum to the result-String
                                   //  End of loop (implicit / single-line body)
  return r;                        //  Return result-String
}                                  // End of method

int s(List<ArrayList<Integer>>l){  // Separate method with List-matrix parameter and integer return-type
  int s=0,                         //  The sum
      L=l.size(),                  //  The size of the input list
      i=1;                         //  Temp integer
  for(;l.get(0).size()>0;          //  Loop (1) over the items of the first row
    s+=l.get(0).                   //   Add the number to the sum
                remove(0)          //   And remove it from the list afterwards
  );                               //  End of loop (1)
  for(;i<L;                        //  Loop (2) over the rows
    s+=l.get(i++).                 //   Add the first number of the row to the sum
                  remove(0)        //   And remove it from the list afterwards
  );                               //  End of loop (2)
  return s;                        //  Return sum
}                                  // End of separate method

PHP, 76 Bytes
<?foreach($_GET as$k=>$v)foreach($v as$n=>$i)$r[min($k,$n)]+=$i;print_r($r);

Try it online!

Mathematica, 116 bytes
l=Length;If[l@#==1||l@#[[1]]==1,Total@Flatten@#,Total/@Flatten/@Table[{#[[i]][[i;;]],#[[All,i]][[i+1;;]]},{i,l@#}]]&

Input form

[{{5}}],     [{{1},{4}}],     [{{7,2}}]  or    [{{....},{....}...{....}}]

Python, 93 bytes
Similar to mbomb007's answer, but without NumPy
f=lambda m:[sum(m[k][k:])+sum(list(zip(*m))[k][k+1:])for k in range(min(len(m),len(m[0])))]

Perl 5 -MList::Util=sum -n, 48 bytes
@,=eval;say sum@{shift@,},map{shift@$_}@,while@,

Try it online!


text:
How many times will you have to golf a quine?
For this challenge, you must create a programme which takes an integer x and outputs its source x many times.
Rules

This is codegolf, the aim is to golf your programme to have the least amount of bytes
If you submit a function, the function must take x as  a parameter and either return or print the entirety of your code x many times to STDOUT. The function body must also not be empty
If you submit a lambda, it is not required for you to assign it to a variable
Standard loophole restrictions apply.
Empty programmes are forbidden
Your programme only has to work when x is a whole integer larger than or equal to 0
Your programme may also not directly read any part of its source code

Nice first Question

Can x be 0, or can we restrict it to positive integers?

Is reading the source of our function permitted?

@mbomb007, I've made an edit to clarify the rules, x maybe any whole integer larger than or equal to 0

@Shaggy, I thought that was a standard loophole, it seems as if it was not. I've made an edit to the question to clearly state that a programme may not read any part of the part of its source code

I think the consensus for quines is that reading of source code is not permitted by default. I always hold out hope, though, because, without reading the source, creating quines make my brain itchy!

I disagree with the reading of sourcecode, as it "Defeats the purpose" of a quine. It's easy to cat $0, it's difficult to programmatically create yourself.

@Spammy23: It's not a standard loophole, but it is a default rule for [tag:quine] challenges, so it was disallowed all along. That said, given that this question is solvable via universal quine constructors, I'm not sure how much it adds to existing quine challenges.

Related, but not a duplicate because the problem is significantly changed by not having to handle negative inputs.

"Your programme may also not directly read any part of its source code". So I guess using a Rexx function called Sourceline(x) which returns line x in the source is a no-no. :)

I'm surprised this isn't a duplicate.

@Spammy23 Does that mean no string literals? :P

Python 2, 50 bytes
Note the trailing comma and newline.
s='s=%r;print s%%s*input(),\n';print s%s*input(),

Try it online!

@mbomb007 Assume there is a newline at the end of the code. Problem solved.

The OP said that x can be zero, in which case nothing should be printed, so this answer is wrong.

@NickA No, it prints a newline, which is wrong.

0 doesn't seem to print a newline to me, as tested by using sys.stdout.write("2") after it.

Japt, 14 bytes
"iQ ²pU"iQ ²pU

Try it online!
Explanation
"iQ ²pU"iQ ²pU
"iQ ²pU"       # Take this string
        iQ     # Prepend a quote
           ²   # Double the string (= source code)
            pU # Duplicate input times

RProgN 2, 8 bytes
{`{.*¶}{

The RProgN2 Loop quine works particularly well for this!
{     } # A function literal
       {# Without a matching }, this loops back to the second instruction, which essentially runs the function. This is a bug, but it works to make the "Looping Quine".
 `{.    # Append the literal {, stringifying the function.
    *   # Multiply the stringified function by the input.
     ¶  # Terminate the program.

Try it online!

Mathematica, 40 33 bytes
Thanks to lanlock4 for saving 7 bytes!
StringRepeat[ToString[#0], #1] &

Pure function taking a nonnegative integer argument. ToString[#0] is the standard Mathematica way to access the current pure function's definition; StringRepeat[..., #1] concatenates (input) copies of that string together. For example,
StringRepeat[ToString[#0], #1] & [2]

yields:
StringRepeat[ToString[#0], #1] & StringRepeat[ToString[#0], #1] &

Could you post a usage example? Running, e.g., StringJoin @@ Table[ToString[#0], #1] & [2] gives me an error.

Really? That exact call works for me. I'm using Mathematica 11....

Hmm, I'm still using 10 (v10.0.1.0)—that could be it. For reference, here's the error that I get: Table::itform: Argument 2 at position 2 does not have the correct form for an iterator.

Aha—I discover that Table[x,5] will return {x,x,x,x,x} in Mathematica 10.2 and beyond, but in Mathematica 10.1 it gives such an error (it expects Table[x,{5}]).

I think you can replace StringJoin @@ Table with StringRepeat.

I can once I know about the command! Thanks :)

Python 2, 70 bytes
This solution works if x=0. There is a single trailing newline.
s='s=%r;exec"print%%r;"%%(s%%s)*input()';exec"print%r;"%(s%s)*input()

Try it online

Python 2, 60 bytes (invalid)
This assumes that x>=1, but the OP clarified that x can be zero. There is a single trailing newline.
s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]

Try it online

V, 11 bytes
ÀñAÀÑ~"qpx

Try it online!
This is an extremely trivial modification of the standard extensible V quine. We simply use À to run it arg1 times.

dc, 31 bytes
[[1-rd91Pn93P[dx]Pdx]s.rd0<.]dx

Try it online!
Explanation:
[[1-rd91Pn93P[dx]Pdx]s.rd0<.]dx
[     91Pn93P[dx]P          ]dx  # Same old regular quine
 [1-rd            dx]s.rd0<.     # Loop until the counter is zero

Japt, 14 bytes
*E îQi"*E îQi"

Try it online!

05AB1E, 23 bytes
"34çìDJ¹.D»"34çìDJ¹.D»

Try it online!

Underload, 12 bytes
(a(:^)*~^):^

Try it online!
Function submission, because Underload has no other way to take input. (The TIO link shows the number 4 given as input, and adds code to print the resulting output).
This is just a universal quine constructor (a(:^)*):^, plus ~^ ("make a number of copies equal to the argument").

Python 2, 41 bytes
_="input('_=%r;exec _'%_*input())";exec _

Try it online!
Does a kinda hacky output using input instead of print, since print has a weird bug involving printing a newline when it isn't supposed to.... Exits with an EOF error.
Explanation:
_="input('_=%r;exec _'%_*input())"; # Set _ to a string
exec _                              # Execute that string
input(                        )     # "print"
      '_=%r;exec _'%_               # The source code with _ formatted in
                     *input()       # Actual input many times

Go, 257 254 bytes
This pains me.
package main;import(."fmt";."strings";."strconv";."os");func main(){s:="package main;import(.\"fmt\";.\"strings\";.\"strconv\";.\"os\");func main(){s:=%q;n,_:=Atoi(Args[1]);Print(Repeat(Sprintf(s,s),n))}";n,_:=Atoi(Args[1]);Print(Repeat(Sprintf(s,s),n))}

Try it online!

Perl, 48 bytes
print"$_\47"x(2*pop)for'print"$_\47"x(2*pop)for'

\47 is the octal escape for a single quote ('). It is interpreted inside double quotes ("), but not inside single quotes.

Javascript ES6, 27 37 bytes
_=>alert(`${f.name}=${f}`.repeat(_))

Edit
+10 bytes if f= should be also displayed

f=

_=>alert(`${f.name}=${f}`.repeat(_))

f(2);

@Downvoter why ?

@Kaiido I don't know.. Should I keep the f= ?

Your code is reading itself by implicitly calling toString on the function.

@acbabis Calling f.toString() or f is the same but it won't display the function name

I believe what @acbabis meant is that it violates the last point of the challenge "Your programme may also not directly read any part of its source code" - using f that way is referring to its own source.

PHP, 194 bytes
<?php $a="PD9waHAgJGE9IiMiOyRpPSRhcmd2WzFdO3doaWxlKCRpLS0pZWNobyBzdHJfcmVwbGFjZShjaHIoMzUpLCRhLGJhc2U2NF9kZWNvZGUoJGEpKTs=";$i=$argv[1];while($i--)echo str_replace(chr(35),$a,base64_decode($a));

Try it online!
Not golfy at all, as b64 quines tend to be.

CJam, 20 12 bytes
8 bytes saved thanks to Martin Ender
{"_~"+ri*}_~

Try it online!
Exaplanation
{       e# Begin a block literal:
 "_~"+  e#  Add whatever's on the stack to the beginning of the array ['_', '~'].
 ri*    e#  Repeat the resulting array a number of times equal to the input.
}       e# Close the block. Push it on the stack.
_~      e# Copy it and run it.

Jelly, 10 bytes
“;⁾vṾẋɠ”vṾ

Try it online!
How it works
“;⁾vṾẋɠ”vṾ  Main link. No arguments.

“;⁾vṾẋɠ”    Set the argument and the return value to the string ';⁾vṾẋɠ'.
         Ṿ  Uneval; yield '“;⁾vṾẋɠ”'.
        v   Eval ';⁾vṾẋɠ' with argument '“;⁾vṾẋɠ”'.
  ⁾vṾ           Yield 'vṾ'.
 ;              Concatenate '“;⁾vṾẋɠ”' and 'vṾ', yielding the source code.
      ɠ         Read an integer from STDIN.
     ẋ          Repeat the source code that many times.

This looks delicious, but my mama always told me not to put strange looking things into my mouth.

GNU Make, 49 bytes
$(foreach ,$(shell seq $1),$(strip $(value $0)))

Make will join the copies by a single space, so I have to include the additional space character at the end and remove it with a strip in between in order to follow the requirement faithfully.

That looks like it reads the source code, which is both by default and explicitly forbidden.

@ØrjanJohansen No, it doesn't read the source, it reads a variable value. It's exactly the same principle as in other answers, take for example JS or Python.

@ØrjanJohansen Oh, I see. $0 in Make functions is not the same thing as in shells. It's the name of the variable the function is called as. See https://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Call-Function.html#Call-Function

Sigh such a gray area. BTW, the Python ones do not do this.

@ØrjanJohansen I'd say that this answer is much closer to Python's than it is to JS's. All call is doing is substituting $0 and $1 with actual parameters — it's simple string interpolation, just like Python's %.

Pyth, 17 bytes
j*]jN*2]"j*]jN*2]

Try it online!
Trivial extension to the pretty-well-known jN*2]"jN*2] quine, but can probably be golfed down

Betaload, 203 bytes
Newlines added for clarity:
(a(:^)*(!()):#(}:(:)~^a((::*:**:*)*)~*(~*)*~(*)~^a*(*)*{)>(0)(!()){:^}(1)(){:^}(2)(:*){:^}(
3)(::**){:^}(4)(:*:*){:^}(5)(::*:**){:^}(6)(:*::**){:^}(7)(::*::***){:^}(8)(:*:*:*){:^}(9)(
::**::**){:^}R^^S):^

I gave myself the restriction that it must read from STDIN rather than from the top of the stack like an Underload answer typically would. I also used proper, decimal input, which makes up most of the code.
Explanation:
I wrap the program up in a quine-wrapper: (a(:^)* and ):^. This means all code inside the quine wrapper will have the program's source code at the bottom of the stack.
In order to convert digits into a normal Church numeral, I use the technique of replacing each digit with the code to multiply by 10 and add that digit:
0 -> (::*:**:*)*
1 -> (::*:**:*)*(:)~*(*)*
2 -> (::*:**:*)*(::)~*(**)*
3 -> (::*:**:*)*(:::)~*(***)*

There's a lot of repetition here, so let's package it up into a subprogram that will take a Church numeral from the top of the stack and use it to construct the "digit string:"
:(:)~^a((::*:**:*)*)~*(~*)*~(*)~^a*(*)*

I put this into a new environment so that it can be accessed quickly:
#(}:(:)~^a((::*:**:*)*)~*(~*)*~(*)~^a*(*)*{)>

Now I can create the replacement code for R. R uses the top elements of the stack to form a lookup table to replace a string from STDIN with Betaload code. It works like this:
()
(0)(code for 0)
(1)(code for 1)
(2)(code for 2)
...
R

However, we can use the subprogram we just made to generate the code segments:
(0)(!()){:^}
(1)(){:^}
(2)(:*){:^}
(3)(::**){:^}
...

When R is run, it will transform the input into a series of subprograms that build up a Church numeral. When this subprogram is executed, it creates that Church numeral on the next element on the stack (0, which was placed down earlier). This means that, after R^, the top value on the stack will be the Church numeral. We then ^ one more time to apply the Church numeral to the final element in the stack (the program's source code) to get the answer.
Fun fact: I've had the MD for this submission for several months. I'd kept it after misunderstanding a question (that I can't seem to find anymore). I had to dig it up from my Recycle Bin to post it here.

Microscript II, 22 bytes:
"v{lqp}sN*h"v{lqp}sN*h

Microscript II, 20 bytes (but technically invalid as it accesses the source code of a code block):
{s""+`"~sN*"s`+}~sN*

Python 3, 69 Bytes
s='s=%r\nx=int(input())\nprint(s%%s*x)\n'
x=int(input())
print(s%s*x)

C, 144 116 bytes
i;main(a){for(i=getchar()-48;i--;)printf(a="i;main(a){for(i=getchar()-48;i--;)printf(a=%c%s%c,34,a,34);}",34,a,34);}

C# (Visual C# Interactive Compiler), 115 bytes
n=>{var s="n=>{{var s={0}{1}{0};for(int i=0;i++<n;)Write(s,(char)34,s);}}";for(int i=0;i++<n;)Write(s,(char)34,s);}

Try it online!

05AB1E, 17 bytes
0"D34çý×?"D34çý×?

Modification of the default quine 0"D34çý"D34çý by adding ×?.
Try it online.
Explanation:
0                   # Push 0 to the stack
                    #  STACK: [0]
 "D34çý×?"          # Push the string 'D34çý×?' to the stack
                    #  STACK: [0, 'D34çý×?']
          D         # Duplicate this string
                    #  STACK: [0, 'D34çý×?', 'D34çý×?']
           34ç      # Push '"' to the stack
                    #  STACK: [0, 'D34çý×?', 'D34çý×?', '"']
              ý     # Join the stack by this '"' delimiter
                    #  STACK: ['0"D34çý×?"D34çý×?']
               ×    # Repeat the string the (implicit) input amount of times
                    #  input = 2 → STACK: ['0"D34çý×?"D34çý×?0"D34çý×?"D34çý×?']
                ?   # Output to STDOUT without trailing newline

05AB1E, 27 25 bytes
"34çs«DJ¹FD,"34çs«DJ¹FD,

Try it online!

Pyth, 13 bytes
*jN*2]"*jN*2]

Test suite
The standard Pyth quine plus two * for the repetition.

Vyxal, 6 bytes
`I*`I*

Try it Online!
Quine cheese (סּ͡͡ ◞סּ͡͡ )
Explained
`I*`I*
`I*`    # The string "I*"
    I   # with itself quoted, prepended
     *  # Repeated input times

Created with the help of Luminespire.


text:
Words that Contain Digits
A digit word is a word where, after possibly removing some letters, you are left with one of the single digits:
ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT or NINE (not ZERO).
For example, BOUNCE and ANNOUNCE are digit words, since they contain the digit one.
ENCODE is not a digit word, even though it contains an O, N and E, since they are not in order.
Write a program/function which takes a single (uppercase or lowercase -- you choose) word as input or a parameter and determines if it is a digit word. Make the code as short as possible.
If the word is not a digit word, you should return 'NO', 0 or any 'falsey' value (this may vary based on your language). If the word is a digit word, you should output the digit it contains, as a number.
You can assume that no words contain more than one digit, so you won't have anything like ONFIVE.
Test Cases
BOUNCE
1

ENCODE
NO

EIGHT
8

BLACKJACK
NO

FABULOUS
NO

EXERCISE
NO

DRIFTWOOD
2

SERVICEMAN
7

INSIGNIFICANCE
9

THROWDOWN
2

ZERO
NO

OZNERO
1

This challenge is taken from (and is a very slight modification of) Question 1 from BIO 2009. Most of the test cases are taken from the mark scheme.

Is it really important that we accept only uppercase words, or can we choose to accept lowercase words instead?

NOFELINEVET contains both 5 and 9 ... what should I return?

Can we return 0 in the no-digit-found case even if it's not falsey in the language of choice?

@Titus: from the rules: "You can assume that no words contain more than one digit"

@GregMartin Well, I guess it doesn't add anything to the challenge, so yes, lowercase is allowed. I've changed it.

@nimi Yes, I'll clarify.

The trick used in this answer might help a lot here.

Javascript (ES6), 101 99 bytes

f=
s=>-~'ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE'.split` `.findIndex(x=>s.match([...x].join`.*`))
<!-- snippet demo: -->
<input list=l oninput=console.log(f(this.value))>
<datalist id=l><option value=BOUNCE>
<option value=ENCODE>
<option value=EIGHT>
<option value=BLACKJACK>
<option value=FABULOUS>
<option value=EXERCISE>
<option value=DRIFTWOOD>
<option value=SERVICEMAN>
<option value=INSIGNIFICANCE>
<option value=THROWDOWN>
<option value=ZERO>
<option value=OZNERO>

PHP>=7.0, 87 Bytes
<?for(;$i++<9;)levenshtein(IntlChar::charName("$i"),"DIGIT $argn",0,1,1)?:die("$i")?>NO

If only insertions of chars from one digit as word to the input is done exit the program with the digit.
Or change the order to levenshtein("DIGIT $argn",IntlChar::charName("$i"),1,1,0) to count not the deletions of chars
levenshtein
IntlChar::charName
PHP>=7.0, 112 Bytes
for(;$i<9;)$r+=++$i*preg_match("#".chunk_split(substr(IntlChar::charName("$i"),6),1,".*")."#",$argn);echo$r?:NO;

IntlChar::charName
PHP, 128 Bytes
foreach([ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE]as$v)$r+=++$k*preg_match("#".chunk_split($v,1,".*")."#",$argn);echo$r?:NO;

Try it online!
143 Bytes for more then 1 digit

foreach([ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE]as$v)$r.=++$k*preg_match("#".chunk_split($v,1,".*")."#",$argn);echo+$r?strtr($r,[""]):NO;

Try it online!

foreach(...)$r+=++$k*preg_match(...);echo$r?:NO; (-1 byte). chunk_split($v,1,".*") instead of join(...) (-2 bytes).

@Titus very nice idea with the replacement withchunk_split I have never seen it before. You should make an entry in the tips section

wicked idea! To answer your question: I´ll have a look into IntlChar::enumCharNames ... tomorrow.

levenshtein() seems to work: <?for(;$i++<9;)levenshtein(IntlChar::charName("$i"),"DIGIT $argn",0,1,1)?:die("$i")?>NO.

@user63956 Great idea Thank you. you should add it to the tips section to find subsequences

@ØrjanJohansen The levenshtein version has no test link because it exists no online tool which had activated the IntlChar class. But I could build a Version without this. Try it online!

Thanks, although you seem to have seen my comment even though I deleted it because I realized it was stupid.

@ØrjanJohansen I could not directly answer your comment. It was not stupid cause it is not easy to understand the version with levenshtein. I could understand that you are missing a test link in this case.

Alas, it was actually the IntlChar part I was missing, specifically that the name of the character includes DIGIT .

Mathematica, 83 bytes (WindowsANSI encoding)
±w_:=Rest@Position[Subsets@w~Cases~#&/@Characters@*IntegerName~Array~9,Except@{},1]

Defines a unary function ± that takes a list of lowercase characters as input and returns either a digit, in a form like {{7}}, or else an empty list {}. I don't feel like I did a ton of golfy things here, except that Characters@*IntegerName~Array~9 generates the number-name matches to look for without hard-coding them.
Example usage:
±{"i", "n", "s", "i", "g", "n", "i", "f", "i", "c", "a", "n", "c", "e"}

yields {{9}}.

Edited to clarify usage

Python 3, 150 bytes
from itertools import*;lambda x:([i for i in range(10)if(*' OTTFFSSENNWHOIIEIIEORUVXVGN  ERE EHE  E   NT '[i::9],)in[*combinations(x+'  ',5)]]+[0])[0]

combinations returns all the combinations of things in order. It would be simpler to have a set number for the second parameter of combinations, so spaces are added onto the end of the original string that is a parameter of my lambda. That's a simple description of how my entry works. Ask if you would like any more clarification.

Jelly, 31 28 bytes
-2 bytes now that lowercase input is acceptable
“¡¦ẇṆb~ṇjṚØ%ĖġṘḥḞṾṇJḌ»Ḳe€ŒPT

A full program that expects lowercase input and prints the result, using 0 for the falsey case.
As a monadic link taking a list of characters it actually returns a list of integers which contains a single 0 in the falsey case, a single integer between 1 and 9 inclusive in the expected use cases and multiple such entries in cases where more than one number exists in the word.
Try it online!
How?
“¡¦ẇṆb~ṇjṚØ%ĖġṘḥḞṾṇJḌ»Ḳe€ŒPT - Main link: list of characters, s
“¡¦ẇṆb~ṇjṚØ%ĖġṘḥḞṾṇJḌ»       - dictionary lookup of "one two three four five six seven eight nine"
                      Ḳ      - split on spaces
                         ŒP  - partitions of s
                       e€    - exists in? for €ach
                           T - truthy indexes

How do you use compressed strings??? >_> The compressor by Lynn doesn't work for me, any tips?

Head into the Jelly chatroom and post the error / issue.

Uppercase isn't required.

Ruby + to_words: 49 48+12 = 61 60 bytes
Uses the flags -rto_words -n. Takes lowercase words. Returns nil if no "digit" found.
-1 byte now that lowercase input is allowed, allowing for the removal of the i flag on the regex.
p (1..9).find{|i|$_=~/#{i.to_words.chars*".*"}/}

For a more pure Ruby answer without external gems, 91+1 = 92 bytes:
p (1..9).find{|i|$_=~/#{%w"0 ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE"[i].chars*".*"}/}

Python, 148 bytes
from itertools import*
lambda s:[tuple(w)in combinations(s,len(w))for w in("x ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE "+s).split()].index(1)%10

An unnamed function taking an uppercase only word and returning the integer (1 to 9), or 0 for NO.
Try it online!
How?
For an input string s the function traverses through a list of the strings: "x", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT" , "NINE", and s itself looking for any matches.*
The comparison used is whether this string, w, is one that may be formed from a combination of letters in order from the input. The function combinations gets these for us (and only the ones of the required length using len(w)), but they are in the form of tuples, so the strings are cast to tuples for the comparison.
Of the eleven results the one for "x" will always be False, while the one for s itself will always be True. The "x" is there to ensure the index of a match with ONE through NINE are the values required (since Python lists are 0-indexed), the s is there to ensure
the call to index(1) (synonymous with index(True)) wont fail when no digit word was found, whereupon the resulting 10 is converted to a 0 with a modulo of ten using %10.
* If s contains spaces for some reason, the list of ws will be longer, but the process will still work since the digit word matches will work the same way, and if none match the first space-split substring from s will match, once again giving 10 and returning 0.
If multiple digit words exist the function will return the minimal one.

Japt, 52 bytes
1+`e two È(e fŒr five £x  v eight ÍÂ`¸a@v fX¬q".*

Try it online!

05AB1E, 26 bytes
The falsy value here is 0.
æ‘€µ‚•„í†ìˆÈŒšï¿Ÿ¯¥Š‘#å1k>

Explanation:
æ                           # Compute the powerset of the input
 ‘€µ‚•„í†ìˆÈŒšï¿Ÿ¯¥Š‘       # Push "ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE"
                     #      # Break on spaces
                      å     # Check each for membership
                       1k   # Get the index of 1 in the array (-1 if not found)
                         >  # Increment by one

Uses the 05AB1E encoding. Try it online! or Verify all test cases!

1k> can be ƶà for -1 byte.

Retina, 160 126 120 bytes
O.*N.*E
1
T.*W.*O
2
T.*H.*R.*E.*E
3
F.*O.*U.*R
4
F.*I.*V.*E
5
S.*I.*X
6
S.*E.*V.*E.*N
7
E.*I.*G.*H.*T
8
N.*I.*N.*E
9
\D

Try it online!
Returns an empty string if the input does not contain a digit.
-6 bytes thanks to @CalculatorFeline.

1 byte save: use 0 instead of NO.

@CalculatorFeline Or even an empty string which is a 6 char save. Thanks!

Java (JDK), 150 bytes
s->{for(var i=0;i<9;)if(s.matches("."+"ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE".split(" ")[i++].replaceAll(".","*$0.")+"*"))return i;return"NO";}

Try it online!
Saves

167 -> 153: various optimization thanks to @KevinCruijssen

You only use the array once, so you can use "ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE".split(" ")[i].split("") directly in the for-loop, and get rid of String[]N= and ;. And you can save an additional 2 bytes by changing the order of the for-loop: for(int i=0;i<9;), use [i++] instead of [i] in the if-check, and get rid of the +1 in the return.

You can save another byte by changing "".join to s.join.

Bash, 163 bytes
a=NO;case $1 in *O*N*E*)a=1;;*T*W*O*)a=2;;*T*H*R*E*E*)a=3;;*F*O*U*R*)a=4;;*F*I*V*E*)a=5;;*S*I*X*)a=6;;*S*E*V*E*N*)a=7;;*E*I*G*H*T*)a=8;;*N*I*N*E*)a=9;;esac;echo $a

Try it online!
a=NO;
case $1 in
 *O*N*E*)a=1;;
 *T*W*O*)a=2;;
 *T*H*R*E*E*)a=3;;
 *F*O*U*R*)a=4;;
 *F*I*V*E*)a=5;;
 *S*I*X*)a=6;;
 *S*E*V*E*N*)a=7;;
 *E*I*G*H*T*)a=8;;
 *N*I*N*E*)a=9;;
esac;
echo $a

Don't know RETINA but seems a straight port of that answer.

tried to reduce *'s with j=0;for i in ONE TWO .. ; do ((j++)); printf "%s)a=%s;;" $(sed 's/./\*&\*/g' <<<$i) $j ; done  but was longer

Haskell, 113 111 bytes
import Data.List
last.((`elemIndices`([]:words"ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE"))=<<).subsequences

Try it online!
Returns 0 if no digit is found.
Find all subsequences of the input word in the list of digits. Prepend an empty string [] at index 0 which is part of every subsequence.  elemIndices returns a list of indices and =<< flattens them into a single list. Pick the last index.

JavaScript (ES6), 121 bytes

f=
s=>[...s].map(c=>a=a.map(s=>s.slice(s[0]==c)),a=`ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE`.split` `)&&1+a.indexOf(``)
<input oninput=o.textContent=f(this.value)><pre id=o>0

Returns the lowest detected digit or 0 if no digit was detected (+6 if NO is required).

Brachylog, 57 bytes
∧"ONE
TWO
THREE
FOUR
FIVE
SIX
SEVEN
EIGHT
NINE"ṇi₁Ph⊆?∧Pt

Try it online!
Explanation
I think this could be shorter if i were reversible, but it doesn't appear to be.
∧"..."ṇi₁Ph⊆?∧Pt
∧                  Break unification with input
 "..."             String containing words ONE through NINE, newline-separated
      ṇ            Split on newlines
       i₁          [item, index] pair for some item in that list (1-based index)
         P         Call that pair P
          h        Its first element (the word)
           ⊆       is a non-contiguous substring of
            ?      the input
             ∧     And
               Pt  P's last element (the index) is the output

Python, 125 123 bytes
f=lambda b,x=9,i=0:x and f(b,x-1)+x*all(i:=b.find(c,i)+1for c in"NINE EIGHT SEVEN SIX FIVE FOUR THREE TWO ONE".split()[-x])

Attempt This Online!
-2 bytes from @xnor, also fixing a misalignment with the spec

Unfortunately, this says. i.e., that THREW contains THREE due to how it handles repeated letters, but it can be fixed for 2 bytes.

You also need to count the f=. But here's a byte back for 126.

Back to 123 bytes

@xnor Somehow, every time I read your solutions, I think both "Thats a very clever solution" and "Why didn't I think of that?" in equal measure :P

Factor + math.combinatorics math.text.english, 53 bytes
[ all-subsets 9 [1,b] [ number>text ] map disjoint? ]

Try it online!
Returns f for 'is a digit word' and t for 'is not a digit word.'

all-subsets Get all the subsets of the input.
9 [1,b] [ number>text ] map A shorter way to write { "one" "two" "three" "four" "five" "six" "seven" "eight" "nine" }.
disjoint? Do the sets not overlap? (This is 2 bytes shorter than saying intersects?.)

Pyth, -44-  41 bytes
+1xm}dyQc."EX%~)Û#lº,îQÓCe¯4Aô4"\P1

Takes a quoted string, outputs 0 for NO.
Try it!
explanation
+1xm}dyQc."EX%~)Û#lº,îQÓCe¯4Aô4"\P1
         ."EX%~)Û#lº,îQÓCe¯4Aô4"      # Compressed string: "ONEPTWOPTHREEPFOURPFIVEPSIXPSEVENPEIGHTPNINE" (P is close to the other letters, makes the compression better)
        c                       \P    # split on P: ['ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE']
   m                                  # map over this list (variable: d)
    }dyQ                              # is d a (ordered) subset of the input (Q)? (= element of the powerset)
  x                                1  # get the index of the first true
+1                                    # add one, because the list was indexed at 0 and conveniently -1 (not found) becomes 0

PHP, 134 132 128 bytes
<?=preg_match(strtr(chunk_split("#(ONE0TWO0THREE0FOUR0FIVE0SIX0SEVEN0EIGHT0NINE",1,".*"),[")|("]).")#",$argn,$m)?count($m)-1:NO;

run as pipe with -nF or try it online.
Creates a regex with the words in parentheses; i.e. each word N is in the Nth sub-expression.
If a word is found, the matched string will be in $m[0] and in the the Nth element, with the elements between them empty and no empty string behind; i.e. $m has N+1 elements.

Great I love it

You can save 3 Bytes with your own idea a little improve <?=preg_match("#(".strtr(chunk_split(ONE0TWO0THREE0FOUR0FIVE0SIX0SEVEN0EIGHT0NINE,1,".*"),[")|("]).")#",$argn,$m)?count($m)-1:NO; Try it online!

Can you use my new approach?

Javascript, 121 bytes
(s,a=0)=>'ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE'.split``.map((p,i)=>RegExp(p.split``.join`.*`).exec(s)?a=i+1:0)&&a

or 116
(s,a=0)=>' ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE'.split` `.map((p,i)=>a|=~s.search(p.split``.join`.*`)&&i)&&a

But just recycling material at this point.

Python 2, 155 bytes
import re;lambda k:next((i for i,j in enumerate([re.search('.*'.join(list(s)),k)for s in'ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE'.split()])if j),-1)+1

An anonymous function searching for regex group. Not the best solution here in Python but an alternative way.

Java, 254 bytes
int g(String a,String b){int i=0,p=0;for(char c:a.toCharArray()){p=i;i=b.indexOf(c);if(i<=p)return 0;}return 1;}
String f(String a){String[]T={"ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE"};for(String t:T)if(g(t,a)>0)return t;return"NO";}

Try Online
boolean g(String a,String b)
{
    int i = 0, p = 0;
    for(char c:a.toCharArray())
    {
        p = i;
        i = b.indexOf(c);
        if(i <= p) return false;
    }
    return true;
}

String f(String a)
{
    String[]T={"ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE"};
    for(String t:T)if(g(t,a))return t;
    return"NO";
}

C, 198 bytes
Try Online
char*T[]={"ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE"};
g(char*a,char*b){while(*a&*b)a+=(*b++==*a);return!*a;}
i;char*f(char*b){for(i=0;i<9;i++)if(g(T[i],b))return T[i];return"NO";}

Vyxal, 9 8 bytes
9'∆ċ?ṗṠc

Try it Online!
-1 thanks to EmanresuA
9 bytes but faster:
9'∆ċ:?Þ∩=

Try it Online!
The joys of having number to word built-ins!
Explained
9'∆ċ:?Þ∩=
9'        # From the range [1, 9], keep only items n where:
  ∆ċ      #   n as a word
     ?Þ∩  #   under multiset intersection with the input
    :   = #   is the same.

8 (slow)


text:
Split me in half
You will be given a  number x, where 0 <= x <= 2^32 - 1.
You should output a list of numbers in decimal, after recursive splitting in binary format.
Examples:
Example 1:
255 -> 255 15 15 3 3 3 3 1 1 1 1 1 1 1 1

The current list is just 255.
The binary representation of 255 is 1111 1111. Splitting it, we get 1111 and 1111, which in decimal are 15 and 15.
We add those to the list, so we will have 255 15 15.
Now the numbers 15 and 15 will serve as inputs and these numbers are to be split.
Doing it again, we get (3 3 from both 15s): 255 15 15 3 3 3 3.
Continuing the logic, final list will be 255 15 15 3 3 3 3 1 1 1 1 1 1 1 1 . And since 1 can no longer be split, the output stops.
Example 2:
225 -> 225 14 1 3 2 1 1 1 0

The starting list is 225.
The binary representation of 225 is 1110 0001. Splitting it, we get 1110 and 0001, which in decimal are 14 and 1.
Adding those to the list, we get 225 14 1.
Now the numbers 14 and 1 will serve as inputs and these numbers are to be split.
Since 1 is no splittable,  the output will be 225 14 1 3 2.
Example 3:
32 -> 32 4 0 1 0

Conditions:

If the number of binary digits are odd, the first number will have one fewer binary digit than the next one. Example, 20 (10100) will be split as 10 and 100, with decimal output being 2 and 4.
Standard loophole rules apply.
0s and 1s do not propagate further.
Program crashing for trying to display too many numbers is a valid exit condition.

@Satan'sSon If you pad in front, that's equivalent to the description.

Is the specified output order required or just the values?

@Satan'sSon No padding with 0s.

@JonathanAllan The specified output order is required.

Suggesting different title of "Split this in Half".

Pyth, 18 bytes
u+QiR2smc2+0dt#.BM

Test suite
This code does something very tricky and clever with u, Pyth's fixed point operator.
The body of the function, which is everything other than the u, is fairly straightforward:
+QiR2smc2+0dt#.BM
+QiR2smc2+0dt#.BMG    Implicit variable
                      G will store the list of numbers from the previous iteration.
              .BMG    Map each number to its binary representation
            t#        Filter out the ones of length 1 (0 and 1)
      m               Map the remaining binary
         +0d          Prefix with a 0
       c2             Chop in half.
                      Since c puts the larger half first, prefixing with a 0
                      makes the chop work out right, and doesn't change the value.
     s                Concatenate
  iR2                 Map back to binary
+Q                    Add the input to the front of the list

This code removes 0s and 1s, splits every number, and adds the input in front.
u will run this function on the prior result of the function until the result stops changing.
What initial value does u use? That's the clever part: the code doesn't specify what value to use, so it defaults to the input. But the input isn't a list of numbers - it's a number. Pyth implicitly coerces the number on the fist time through the loop to the range of the number - [0, 1, ..., Q-1]. That doesn't look anything like the output we want to get. Fortunately, u will find the correct result regardless of what the initial input is - the desired output is the only fixed point of the function, and repeated application will always reach it.
Let's look at the intermediate values of the program with the input 7. I've highlighted the prefix of the result which is guaranteed to be correct, regardless of initial input:

7 (Implicitly [0, 1, 2, 3, 4, 5, 6])
[7,1, 0, 1, 1, 1, 0, 1, 1, 1, 2]
[7, 1, 3,1, 0]
[7, 1, 3, 1, 1]

Which is the output.

Packed Pyth, 16 bytes
Note that since Pyth uses only the 0-127 range of ASCII, it can be compressed by using a 7-bit encoding rather than an 8 bit encoding. Thus, the above program can be packed into 16 bytes. The resulting program is:
ꮎ�L����[
    ���4

hexdump:
0000000: eaae 8e9a 4cb9 edc6 c95b 0c9d 11ae 8534  ....L....[.....4

The interpreter is found here. Provide the input as a command line argument.
The code page of this language (Packed Pyth) is the 0-127 range of ASCII, and every character is represented with 7 bits, padded at the end. Thus, the above unreadable hexdump represents:
u+QiR2smc2+0dt#.BM

But in 16 bytes.

05AB1E, 21 20 18 17 bytes
,¸[Žrbvy0ì2äCʒ=1›

Try it online!
Explanation
,¸[Žrbvy0ì2äCʒ=1›   Argument n
,¸                  Print n and push n as array
  [Ž                Loop until stack is empty
    r               Reverse stack
     b              Convert elements in array to binary
      v             For each y in array
       y0ì2ä        Prepend '0' to y and split it into 2 elements
                    (the first element will take the additional character)
            C       Convert elements to decimal
             ʒ=1›   Keep only elements greater than 1, while printing each element

@JonathanAllan Yep fixed it now. Seems to be a problem the examples do not cover, thanks :)

ʒ - This new codepage... Since when is 05AB1E Jelly? Me likey.

Jelly, 21 20 bytes
-1 byte by removing a monadic chain and then dealing with the consequence of an empty list being converted from binary yielding 0 later.
ỊÐḟBUœs€2UḄF
WÇÐĿṖUF

A monadic link taking a number and returning the list specified.
Try it online!
How?
ỊÐḟBUœs€2UḄF - Link 1, perform an iteration: list of numbers
 Ðḟ          - filter out if:
Ị            -   insignificant (absolute value <= 1 - hence any 0s or 1s)
   B         - convert to a binary list (vectorises)
    U        - upend (reverse each)
     œs€2    - split €ach into 2 equal chunks (the first half is longer if odd ...hence
         U   - upend (reverse each)         ...this upend and the previous one)
          Ḅ  - convert from binary list to number (vectorises, although when the filter
             -                                     removes everything a zero is yielded)
           F - flatten the resulting list of lists to a single list

WÇÐĿṖUF - Main link: number
W       - wrap in a list
  ÐĿ    - loop and collect results until no change occurs:
 Ç      -   call last link (1) as a monad
    Ṗ   - pop (remove the last element - a list containing a single zero which results
        -     from the effect of Ḅ when link 1's input only contained ones and zeros)
     U  - upend (put the iterations into the required order)
      F - flatten to yield a single list

How does this work?

@Satan'sSon I added an explanation just now

You added it at the same time I commented :D

@ØrjanJohansen both ways have the same byte cost

Oh, didn't see the Pyth answer first, which already used that trick.

JavaScript (ES6), 99 bytes
This looks a bit too long. There might be a better way to get the correct order.
f=(n,p=(a=[],1),i=33-Math.clz32(n)>>1)=>(a[p]=n)>1?f(n>>i,p*=2)&&f(n&(1<<i)-1,p+1):a.filter(n=>1/n)

Demo

f=(n,p=(a=[],1),i=33-Math.clz32(n)>>1)=>(a[p]=n)>1?f(n>>i,p*=2)&&f(n&(1<<i)-1,p+1):a.filter(n=>1/n)

console.log(JSON.stringify(f(255)))
console.log(JSON.stringify(f(225)))
console.log(JSON.stringify(f(32)))

PHP, 132 Bytes
for($r=[$argn];""<$n=$r[+$i++];)$n<2?:[$r[]=bindec(substr($d=decbin($n),0,$p=strlen($d)/2)),$r[]=bindec(substr($d,$p))];print_r($r);

Try it online!

This does not work, according to the Try it online system in this page,

@MartinBarker what do you mean?

https://tio.run/nexus/php#bY1BCsIwEEX3HqPMIkMCSsCNk6EHCaFYUzUgY0jr@dPRtcv3@I8fxvqsB7i2h7D3Z@r3dzPQOP5UomEIIAwtWijWJkKQ4MdLVJN4LpKXm1k/87pplVlJnQFBd3JQWfVrUc549Ijub6Q7xES1Fdmm7zdS7zs => Array(    [0] => 225    [1] => 14    [2] => 1    [3] => 3    [4] => 2    [5] => 1    [6] => 1    [7] => 1    [8] => 0 ) when it does not = 255 15 15 3 3 3 3 1 1 1 1 1 1 1 1

@MartinBarker You must change the input in the header Version. Change the variable $argn This variable is available if you running PHP from the command line with the -R option. Here is an example for input 255 Try it online!

That's what i was trying to say it did not work according to the try it online system. (linked in the post)

@MartinBarker understand I am you right you want a output like this? Try it online! instead of printing the array directly join it first to a space separeted string? Other answers do the same that they modify the output to save some bytes

Ruby, 102 bytes
f=->*a{a==[]?[]:a+=f[*a.map{|i|s='%b'%i;i>1?[s[0...h=s.size/2].to_i(2),s[h..-1].to_i(2)]:[]}.flatten]}

Try it online!

Java 10, 541 521 245 243 bytes
n->{var L=new java.util.Stack<Integer>();L.add(n);for(int i=9,o=0,t;o<i;)for(i=o;i<L.size();o++)if((t=L.get(i++))>1){var b=n.toString(t,2);L.add(n.parseInt(0+b.substring(0,t=b.length()/2),2));L.add(n.parseInt(b.substring(t),2));o++;}return L;}

Try it online.
-22 bytes thanks to @ceilingcat.
Explanation:
n->{                      // Method with Integer parameter & Integer-List return-type
  var L=new java.util.Stack<Integer>();
                          //  Create the result-List
  L.add(n);               //  Add the input-Integer to it
  for(int i=9,            //  Index integer `i`, set to a non-0 digit
      o=0,                //  Off-set integer `o`, starting at 0
      t;                  //  Temp integer `t`, uninitialized
      o<i;)               //  Loop as long as `o` isn't `i` yet:
    for(i=o;i<L.size()    //   Inner loop `i` in the range [`o`,list-size):
        ;o++)             //     After every iteration: Increase `o` by 1
      if((t=L.get(i++))   //    Set `t` to the `i`'th item
                          //    (and increase `i` by 1 afterwards with `i++`)
         >1){             //    If `t` is larger than 1 (thus can be further split):
        var b=n.toString(t,2);
                          //     Convert `t` to a binary-String
        L.add(            //     Add to the List:
          n.parseInt(     //      A String converted to Integer:
            0             //       A "0",
            +b.substring( //       Appended with a substring of `b`
               0,t=b.length()/2)
                          //       in the char-range [0,length/2)
          ,2));           //      Converted as a base-2 String to base-10 Integer
        L.add(            //     Also add to the List:
          n.parseInt(     //      A String converted to Integer:
            b.substring(  //       A substring of `b`
              t)          //       in the char-range [length/2,length)
          ,2));           //      Also converted from a base-2 String to base-10 Integer
        o++;}             //     And increase `o` by 1
  return L;}              //  Return the result-List

Python 2, 110 bytes
l=[input()];i=1
while i:
 z=0
 for k in l[-i:]:
	if k>1:b=~-len(bin(k))/2;l+=[k>>b,k&2**b-1];z+=2
 i=z
print l

Try it online!

Retina, 142 bytes
.+
$*
+`(1+)\1
${1}0
01
1
{`.+$
$&¶<$&>
+`;(\d*)>
>;<$1>
<.>

{`(\d)>
>$1
}`<(\d)
$1<
<>
;
\b0+\B

}`^;|;\B

¶
;
;;

1
01
+`10
011
0\B

1+
$.&

Try it online!

Ruby, 98 bytes
f=->*a{a==[]?a:a+=f[*a.flat_map{|i|s='%b'%i;i>1?[s[0...h=s.size/2].to_i(2),s[h..-1].to_i(2)]:[]}]}

Try it online!
Simply a basic optimization of Value Ink's answer : use flat_map instead of map...flatten, and use
a==[]?a instead of a==[]?[]

MathGolf, 18 bytes
{gÉo1>môàh½‼<≥å}∟;

Takes the input wrapped inside a list. If this is not allowed, a leading a can be added.
Print each of the resulting items on a separated line to STDOUT.
Try it online.
Explanation:
{              }∟  # Do-while true without popping:
 g                 #  Filter the current list of integers by
                   #  (or the implicit input-list in the first iteration),
  É                #  using the following 3 characters as inner code-block:
   o               #   Print the integer with trailing newline (without popping)
    1>             #   Check that it's larger than 1 (thus can be further split)
      m            #  Map over the remaining integers,
       ô           #  using the following 6 characters as inner code-block:
        à          #   Convert the integer to a binary-string
                   #   Split it into the correct halves by:
         h         #    Pushing its length (without popping)
          ½        #    Integer-dividing this length by 2
           ‼       #    And apply the following commands separated on the stack:
            <      #     Slice to get the first length//2 bits
             ≥     #     Slice to get the remaining bits
              å    #  After the map: convert all binary-parts back to integers
                 ; # After the do-while: remove the empty list from the stack
                   # (the empty stack is then output implicitly with newline)