Help for this page

Select Code to Download


  1. or download this
    use feature 'say';
    use List::MoreUtils 'part';
    ...
    @array = (1, 2, 3, 4, 2, 1, 2, 0, 1, 0, 0);
    
    say join ' ', map { @$_ } part { !!$_ } @array;
    
  2. or download this
    0 0 0 1 2 3 4 2 1 2 1
    
  3. or download this
    (define array (list 1 2 3 4 2 1 2 0 1 0 0))
    
    ...
                  (partition (lambda (x) (< x 1)) 
                             array)])
      (flatten (list x y)))