Reputation: 35
Consider the following piece of PyEDA:
a, b, c = map(exprvar, 'abc')
f1 = And(a,Or(~a,b))
print(f1)
outputs:
And(a, Or(~a, b))
How can I replace the first a
with c
? compose
replaces all instances of a
:
f1.compose({a: c})
outputs:
And(c, Or(~c, b))
Upvotes: 1
Views: 89