4 ms·
I think in this case it's a reasonable approach to writing the `dpll` function because that function doesn't actually care about the specifics of the types. Th
by mightybyte 10y ago
I think in this case it's a reasonable approach to writing the `dpll` function because that function doesn't actually care about the specifics of the types. This is a nice example of encapsulation and implementation hiding, a concept familiar to object-oriented and functional programmers alike. He could have easily gotten it to compile by stubbing things out as follows:
data Clauses = Clauses
data Symbols = Symbols
data Model = Model
isTrueIn = undefined
isFalseIn = undefined
findPureSymbol = undefined
minus = undefined
including = undefined
findUnitClause = undefined
I think it's more a question of personal preference than right or wrong.