Skip to content

Commit

Permalink
Add Succ functor for strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ExternalReality authored and ExternalReality committed Dec 14, 2011
1 parent fd3ea7e commit f9293fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rparsec/functors.rb
Expand Up @@ -8,6 +8,7 @@ module Functors
Idn = proc {|*x|x}
Neg = proc {|x|-x}
Inc = proc {|x|x+1}
Succ = proc {|x|x.succ}
Dec = proc {|x|x-1}
Plus = proc {|x,y|x+y}
Minus = proc {|x,y|x-y}
Expand Down Expand Up @@ -271,4 +272,4 @@ def power(n)
alias * repeat
end

end # module
end # module

0 comments on commit f9293fb

Please sign in to comment.