Description Usage Arguments Examples
Query a database
1 2 3 4 5 6 7 8 9 | logician_query(database, question)
logician_query_(database, question)
## S3 method for class 'logician_clause'
logician_query_(database, question)
## S3 method for class 'logician_r_expr'
logician_query_(database, question)
|
database |
a list of rules and facts |
question |
a clause of type |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | database <- logician_database(
connected(berlin, hamburg),
connected(hamburg, chicago),
connected(chicago, london),
connected(aachen, berlin),
connected(chicago, portland),
connected(portland, munich),
path(A, B) := connected(A, B),
path(A, B) := connected(A, Z) && path(Z, B)
)
iter <- logician_query(database, path(berlin, hamburg))
iter$next_value()
iter <- logician_query(database, path(berlin, X))
iter$next_value()
iter$next_value()
iter$next_value()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.