Re: Ann: SWI-Prolog 7.1.0
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 12/07/2013 02:48 PM, Michael Hendricks wrote: > Is there an efficient term_tag(+Term, -Tag:atom) predicate so we can > manually perform this optimization when wanted? > > do(X) :- > term_tag(X, Tag), > do_(Tag, X). > do_(Tag, X) :- > ... Funny enough, this was also proposed by Nicos under the name term_type/2. It might make sense, especially of a variable would leave the type unbound as well (just like term_hash/2). Opinions? Cheers --- Jan