Sha256: e660053415cc645711b8ea815285435639e956546626eaaa9554b51de883eb09

Contents?: true

Size: 208 Bytes

Versions: 4

Compression:

Stored size: 208 Bytes

Contents

require "patternmatching"

include PatternMatching

num = 100
result = make num do
  seems as {:n}, with {n < 10} do
    true
  end
  seems as {:n}, with {n >= 10} do
    false
  end
end

p result #=> false

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
patternmatching-0.2.4 examples/matching_with_condition.rb
patternmatching-0.2.3 examples/matching_with_condition.rb
patternmatching-0.2.5 examples/matching_with_condition.rb
patternmatching-0.2.2 examples/matching_with_condition.rb