block_yield.rb

Ruby上級

Explorer

C40
C++40
C#40
Dart40
Go40
Java40
JavaScript40
Kotlin40
Objective-C40
Perl40
PHP40
Python40
R40
Ruby
初級10
中級10
上級10
user_service.rb
array_methods.rb
hash_transform.rb
block_yield.rb
exception_rescue.rb
module_mixin.rb
regex_match.rb
lambda_proc.rb
safe_navigation.rb
metaprogramming.rb
エキスパート5
マスター5
Rust40
Shell40
Swift40
TypeScript40
block_yield.rb
Click to focus
1
2
3
4
def process(&block)
 return enum_for(:process) unless block_given?
 (1..5).each { |i| yield(i * 2) }
end
0WPM0%0:000/104(0%)|Ln 1, Col 1
UTF-8Ruby

関連する練習問題