Skip to content

Instantly share code, notes, and snippets.

@mhuisi
Created April 23, 2026 09:47
Show Gist options
  • Select an option

  • Save mhuisi/2a5a00b29ae93f3002c81653bd768976 to your computer and use it in GitHub Desktop.

Select an option

Save mhuisi/2a5a00b29ae93f3002c81653bd768976 to your computer and use it in GitHub Desktop.
Infix
((1 + 2) + (((3 + 4) + 5) + (6 + (7 + 8)))) + ((9 + 10) + (((11 + 12) + 13) + (14 + (15 + 16))))
(6 and 7 as well as 14 and 15 fit onto one line)
everywhere non-cumulative:
((1
+ 2)
+ (((3
+ 4)
+ 5)
+ (6 + (7
+ 8))))
+ ((9
+ 10)
+ (((11
+ 12)
+ 13)
+ (14 + (15
+ 16))))
everywhere cumulative (brackets do not introduce nesting):
((1
+ 2)
+ (((3
+ 4)
+ 5)
+ (6 + (7
+ 8))))
+ ((9
+ 10)
+ (((11
+ 12)
+ 13)
+ (14 + (15
+ 16))))
left cumulative, right non-cumulative (brackets do not introduce nesting
((1
+ 2)
+ (((3
+ 4)
+ 5)
+ (6 + (7
+ 8))))
+ ((9
+ 10)
+ (((11
+ 12)
+ 13)
+ (14 + (15
+ 16))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment