Guest User

Untitled

a guest
Jan 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def l_spread (num_accents, size)
  2. (spread num_accents, size)
  3. .chunk_while { |i,j| !j }
  4. .map { |ary| ary.map { |a| if a then ary.length else 0 end } }
  5. .flatten
  6. .map { |i| [ i != 0, i ] }
  7. .ring
  8. end
Add Comment
Please, Sign In to add comment