Problem: kaprekars routine

Code: kaprekars+routine/tails_1766045584

Nibbles version: 0.2 | 0.21 | 0.22 | 0.23 | 0.24 | 0.25 | 1.00

Format: Compact | Simple | +Type | Table | JSON | .nbl (DeBruijn) | .nbl (names)


>> (tail):[[chr]] 
    `. (iterate while uniq):[[chr]] 
        @ (= fstLine):[chr] 
        & (justify):[chr] <--arg( A:[chr] ) 
            "0" (string):[chr] 
            , (length):int 
                $ (= A):[chr] 
            - (subtract):int 
                `r (read int):int 
                    \ (reverse):[chr] 
                        ; (save):[chr] -->let( B:[chr] ) 
                            `< (sort):[chr] 
                                $ (= A):[chr] 
                `r (read int):int 
                    $ (= B):[chr] 

Back to the index