# Is there a meta\_predicate tutorial?

**URL:** <https://swi-prolog.discourse.group/t/is-there-a-meta-predicate-tutorial/2985>\
**Category:** Predicate\
**Created:** [September 30, 2020, 10:51am UTC](https://swi-prolog.discourse.group/t/is-there-a-meta-predicate-tutorial/2985 "2020-09-30T10:51:55Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [October 1, 2020, 7:19pm UTC](https://swi-prolog.discourse.group/t/is-there-a-meta-predicate-tutorial/2985/13 "2020-10-01T19:19:47Z")

</div>

> [@EricGT](#):
>
> big difference between a Goal and closure

From a theoretical point of view, there is a big difference, but from a practical point of view, not so much. You can print out closures to understand what’s going on – they’re just terms.

Note that you can put “_module_:” in front of a compound goal, e.g. `some_module:(goal1(X), goal2(X,Y))`.

Maybe your problem is in understanding how use\_module/1 (and similar) modify the namespace in the current module?  
TL;DR: all the imported names get added to the current module’s namespace. E.g., if you import `foo:bar/1` into module `qqsv` (by `:-use_module(foo,[bar/1])`), then `qqsv:bar(X)` is the same as `foo:bar(X)` and if in module `qqsv` you don’t specify the module, `qqsv` is implicitly used – that is, `bar(X)` is the same as `qqsv:bar(X)` and for a call to a meta\_predicate, `qqsv:` will be added if no module is explicitly given (for args specified by `:`, `0`, etc.).

---

_[View the full topic](https://swi-prolog.discourse.group/t/is-there-a-meta-predicate-tutorial/2985)._
