Description Usage Arguments Value Examples
Return the first n results from an iterator
1 2 |
x |
an object |
n |
an length 1 integer >= 1. sometimes that can result in an infinite loop |
... |
unused dots |
For each solution a list of substitions.
1 2 3 4 5 6 7 8 9 10 11 12 | 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, X))
head(iter, 4) # get the first 4 results if they exists
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.