Equilibrium index: Difference between revisions

Added Quackery.
m (syntax highlighting fixup automation)
(Added Quackery.)
Line 2,420:
[1] -> [0]
[] -> []</pre>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ ' [ 0 ] swap
witheach
[ over -1 peek + join ]
behead drop ] is cumsum ( [ --> [ )
 
[ [] swap dup cumsum
swap reverse cumsum
reverse witheach
[ dip behead = if
[ dip [ i^ join ] ] ]
drop ] is equilibria ( --> [ )
 
' [ -7 1 5 2 -4 3 0 ] equilibria echo</syntaxhighlight>
 
{{out}}
 
<pre>[ 3 6 ]</pre>
 
=={{header|Racket}}==
1,462

edits