polar bear panic demo day

Could this chain of iceberg declarations be converted into a method that takes parameters rather than a set of repeats with different numbers?