Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions en/promises-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `promises` package adds three new methods:
* `promiseQuery`: queries a goal and returns a promise that is resolved when the goal loads successfully, or rejected when there is an error. It takes the same arguments as the `query` method.
* `promiseAnswer`: finds the next computed answer and returns a promise that is resolved when it finds an answer or there are no more answers, or is rejected when there is an error or the limit of inferences has been reached. It takes the same arguments as the `answer` method.

Also, the package adds a fourth method, `promiseAsnwers`, to find all computed answers, returning an asynchronous generator.
Also, the package adds a fourth method, `promiseAnswers`, to find all computed answers, returning an asynchronous generator.

```javascript
const pl = require("tau-prolog");
Expand Down Expand Up @@ -65,4 +65,4 @@ require("tau-prolog/modules/promises.js")(pl);
// X = s(s(s(z))), Y = z.

})();
```
```
4 changes: 2 additions & 2 deletions es/interfaz-de-promesas.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ El paquete `promises` añade tres nuevos méotodos:
* `promiseQuery`: consulta un objetivo y devuelve una promesa que se resuelve cuando el objetivo se carga correctamente, o se rechaza cuando hay un error. Recibe los mismos parámetros que el método `query`.
* `promiseAnswer`: busca la siguiente respuesta computada y devuelve una promesa que se resuelve cuando encuentra una respuesta o no hay más respuestas, o se rechaza cuando hay un error o se ha llegado al límite de inferencias. Recibe los mismos parámetros que el método `answer`.

Además, añade un cuarto método, `promiseAsnwers`, para buscar todas las respuestas computadas, devolviendo un generador asíncrono.
Además, añade un cuarto método, `promiseAnswers`, para buscar todas las respuestas computadas, devolviendo un generador asíncrono.

```javascript
const pl = require("tau-prolog");
Expand Down Expand Up @@ -65,4 +65,4 @@ require("tau-prolog/modules/promises.js")(pl);
// X = s(s(s(z))), Y = z.

})();
```
```