examples/matching.rb in patternmatching-0.2.3 vs examples/matching.rb in patternmatching-0.2.4
- old
+ new
@@ -7,10 +7,10 @@
# For DSL style code, include PatternMatching
include PatternMatching
# match example
def calc(code)
- make (code) {
+ make(code) {
seems as {plus(:a, :b)} do calc(a) + calc(b) end
seems as {mul(:a, :b)} do calc(a) * calc(b) end
seems something do code end
}
end