daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Jan 18th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top