[ prog / sol / mona ]

prog


The Forced Indentation Of Code

21 2022-02-01 04:20

◢◣ pointwise cartesian Sierpinski triangle with customized Y combinator ◢◣

>>> print ((lambda mY, xjoin, size, half, cell, boot, n, E, L, R: (lambda xjoin, cell, char, n: xjoin (n, lambda k: xjoin (2 * n, lambda j: char (boot (cell, n, k, j)), ''), '\n')) (mY (xjoin), mY (cell, mY (half)), lambda c: E if c == 0 else L if c < 0 else R, size (n))) (lambda f, *more: (lambda x: x (x)) (lambda y: f (lambda *args: y (y) (*args), *more)), lambda f: lambda n, g, s: '' if n <= 0 else g (0) if n == 1 else f (n - 1, g, s) + s + g (n - 1), lambda n: 2 ** n, lambda f: lambda n, p: p >> 1 if p > n else f (n, p << 1), lambda f, half: lambda lr, k, j: 0 if j > k else lr if k == 0 else (lambda h: f (-lr, k - h, h - 1 - j) if j < h else f (lr, k - h, j - h)) (half (k, 2)), lambda cell, n, k, j: cell (-1, k, n - 1 - j) if j < n else cell (1, k, j - n), 5, " ", "◢", "◣"))
                               ◢◣                               
                              ◢◣◢◣                              
                             ◢◣  ◢◣                             
                            ◢◣◢◣◢◣◢◣                            
                           ◢◣      ◢◣                           
                          ◢◣◢◣    ◢◣◢◣                          
                         ◢◣  ◢◣  ◢◣  ◢◣                         
                        ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣                        
                       ◢◣              ◢◣                       
                      ◢◣◢◣            ◢◣◢◣                      
                     ◢◣  ◢◣          ◢◣  ◢◣                     
                    ◢◣◢◣◢◣◢◣        ◢◣◢◣◢◣◢◣                    
                   ◢◣      ◢◣      ◢◣      ◢◣                   
                  ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣                  
                 ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣                 
                ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣                
               ◢◣                              ◢◣               
              ◢◣◢◣                            ◢◣◢◣              
             ◢◣  ◢◣                          ◢◣  ◢◣             
            ◢◣◢◣◢◣◢◣                        ◢◣◢◣◢◣◢◣            
           ◢◣      ◢◣                      ◢◣      ◢◣           
          ◢◣◢◣    ◢◣◢◣                    ◢◣◢◣    ◢◣◢◣          
         ◢◣  ◢◣  ◢◣  ◢◣                  ◢◣  ◢◣  ◢◣  ◢◣         
        ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣                ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣        
       ◢◣              ◢◣              ◢◣              ◢◣       
      ◢◣◢◣            ◢◣◢◣            ◢◣◢◣            ◢◣◢◣      
     ◢◣  ◢◣          ◢◣  ◢◣          ◢◣  ◢◣          ◢◣  ◢◣     
    ◢◣◢◣◢◣◢◣        ◢◣◢◣◢◣◢◣        ◢◣◢◣◢◣◢◣        ◢◣◢◣◢◣◢◣    
   ◢◣      ◢◣      ◢◣      ◢◣      ◢◣      ◢◣      ◢◣      ◢◣   
  ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣    ◢◣◢◣  
 ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣  ◢◣ 
◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣
>>> 
267


VIP:

do not edit these