Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Averages-Mode/Quackery/averages-mode.quackery
Normal file
32
Task/Averages-Mode/Quackery/averages-mode.quackery
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[ sort
|
||||
[] [] rot
|
||||
dup 0 peek temp put
|
||||
witheach
|
||||
[ dup temp share = iff
|
||||
join
|
||||
else
|
||||
[ dup temp replace
|
||||
dip [ nested join ]
|
||||
[] join ] ]
|
||||
nested join
|
||||
temp release ] is bunch ( [ --> [ )
|
||||
|
||||
[ sortwith [ size dip size < ]
|
||||
[] swap
|
||||
dup 0 peek size temp put
|
||||
witheach
|
||||
[ dup size temp share = iff
|
||||
[ nested join ]
|
||||
else
|
||||
[ drop conclude ] ]
|
||||
temp release
|
||||
[] swap
|
||||
witheach
|
||||
[ 0 peek join ] ] is largest ( [ --> [ )
|
||||
|
||||
|
||||
[ bunch largest ] is mode ( [ --> [ )
|
||||
|
||||
' [ 1 3 5 7 3 1 3 7 7 3 3 ] mode echo cr
|
||||
' [ 7 13 5 13 7 2 7 10 13 ] mode echo cr
|
||||
' [ 5 ] mode echo cr
|
||||
Loading…
Add table
Add a link
Reference in a new issue