examples/partial_style_method2.rb in patternmatching-0.1.0 vs examples/partial_style_method2.rb in patternmatching-0.1.1
- old
+ new
@@ -8,14 +8,14 @@
# Another partial style method example
class CalcX
extend PatternMatching
func(:calcx) do
- seems as {plus(:x, :y)} do
- calcx(x) + calcx(y)
+ seems as {plus(:a, :b)} do
+ calcx(a) + calcx(b)
end
seems as {mul(:x, :y)} do
- calcx(x) * calcx(y)
+ calcx(a) * calcx(b)
end
end
func(:calcx).seems as {:value} do
value
end