# code: http://golf.shinh.org/reveal.rb?kaprekars+routine/tails_1766045584&nbb # target Nibbles version: 0.2 # commenter version: 0.1.6.187 #(implicit string concatenation):[chr] >> #(tail):[[chr]] `. #(iterate while uniq):[[chr]] @ #(= fstLine):[chr] & #(justify):[chr] <--arg( A:[chr] ) "0" #(string):[chr] , #(length):int $ #(= A):[chr] = #(subscript (wrapped)):chr r #(read str at base):int \ #(reverse):[chr] ; #(let):[chr] -->let( B:[chr] ) `< #(sort):[chr] $ #(= A):[chr] 10 #(integer):int $ #(= B):[chr] 10 #(integer):int <--arg( D:[chr] C:[chr] )