Problem: Derangements

Code: Derangements/tails_1645189937

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)


(implicit map):[[[int]]] 
    | (filter):[[int]] 
        ``p (permutations):[[int]] 
            , (range from 1):[int] 
                6 (integer):int 
        `* (product):int <--arg( A:[int] ) 
            ! (zip with):[int] 
                $ (= A):[int] 
                , (range from 1):[int] <--arg( B:int ) 
                    6 (integer):int 
                ! (zipop: abs diff):null 
    : (append):[[int]] <--arg( D:[int] C:[int] ) 
        $ (= D):[int] 
        ~ (auto = []):auto 

Back to the index