Self-describing numbers: Difference between revisions
Content deleted Content added
Added Quackery. |
m →{{header|Quackery}}: formatting |
||
Line 2,402: | Line 2,402: | ||
<lang Quackery> [ tuck over peek |
<lang Quackery> [ tuck over peek |
||
1+ unrot poke ] |
1+ unrot poke ] is item++ ( n [ --> [ ) |
||
[ [] 10 times [ 0 join ] |
[ [] 10 times [ 0 join ] |
||
Line 2,408: | Line 2,408: | ||
[ 10 /mod rot item++ |
[ 10 /mod rot item++ |
||
swap dup 0 = until ] |
swap dup 0 = until ] |
||
drop ] |
drop ] is digitcount ( n --> [ ) |
||
[ 0 swap witheach + ] |
[ 0 swap witheach + ] is sum ( [ --> n ) |
||
[ 0 swap |
[ 0 swap |
||
witheach |
witheach |
||
[ swap 10 * + ] ] |
[ swap 10 * + ] ] is digits->n ( [ --> n ) |
||
[ dup digitcount |
[ dup digitcount |