Skip to content

Commit db0496d

Browse files
committed
finished silly_blocks exercise
1 parent ed0dc39 commit db0496d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

05_silly_blocks/silly_blocks.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def reverser
2+
yield.split(" ").map { |word| word.reverse }.join(" ")
3+
end
4+
5+
def adder(num = 1)
6+
yield + num
7+
end
8+
9+
def repeater(num = 1)
10+
num.times { yield }
11+
end

0 commit comments

Comments
 (0)