Class: LyambdaGem::Term
- Inherits:
-
Object
show all
- Defined in:
- lib/lyambda_gem/term.rb
Overview
Base abstract class for all terms in the lambda calculus (variables, abstractions, applications)
Instance Method Summary
collapse
Instance Method Details
#free_variables ⇒ Object
4
5
6
|
# File 'lib/lyambda_gem/term.rb', line 4
def free_variables
raise NotImplementedError, "Subclasses must implement the free_variables method"
end
|
#reduce(strategy: :normal_order) ⇒ Object
16
17
18
|
# File 'lib/lyambda_gem/term.rb', line 16
def reduce(strategy: :normal_order)
raise NotImplementedError, "Subclasses must implement the reduce method"
end
|
#reduceable? ⇒ Boolean
12
13
14
|
# File 'lib/lyambda_gem/term.rb', line 12
def reduceable?
raise NotImplementedError, "Subclasses must implement the reduceable? method"
end
|
#substitute(term, variable) ⇒ Object
8
9
10
|
# File 'lib/lyambda_gem/term.rb', line 8
def substitute(term, variable)
raise NotImplementedError, "Subclasses must implement the substitute method"
end
|