<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I had actually done that earlier Zoltan by declaring a type<div class=""><br class=""></div><div class="">:- type callable —> callable(string, list(snode)).</div><div class=""><br class=""></div><div class="">but I felt that this was me giving in to the compiler. Thanks again for your feedback though, today I learned a new word,</div><div class=""><br class=""></div><div class=""> <span style="font-family: CourierNewPSMT; font-size: 16px;" class="">superhomogeneous</span></div><div class=""><font face="CourierNewPSMT" size="3" class=""><br class=""></font><div>which feels like it is to do with milk but as we know it isn't.</div><div><br class=""></div><div>Great list,</div><div>Thanks all once again,</div><div>Sean.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 7 Nov 2021, at 13:45, Zoltan Somogyi <<a href="mailto:zoltan.somogyi@runbox.com" class="">zoltan.somogyi@runbox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">2021-11-07 15:11 GMT+11:00 "Julien Fischer" <<a href="mailto:jfischer@opturion.com" class="">jfischer@opturion.com</a>>:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">:- type snode<br class=""></blockquote> ---> sexp(location, list(snode))<br class=""> ; list(location, list(snode))<br class=""> ; map(location, list(snode))<br class=""> ; tk(location,string)<br class=""> ; kw(location, string)<br class=""> ; s1(location,string)<br class=""> ; s2(location,string)<br class=""></blockquote></blockquote><br class="">Julien answered your question as you asked it, but there is<br class="">something else you could do to achieve your goal that falls outside<br class="">the strict parameters of your question: changing the snode type<br class="">to create single structure holding all the info about sexp's.<br class="">Specifically, you could define a new type like this:<br class=""><br class="">:- type sexp_info<br class=""> ---> sexp_info(location, list(snode)).<br class=""><br class="">and then update the snode type like this:<br class=""><br class="">:- type snode<br class=""> ----> sexp(sexp_info)<br class=""> ; ....<br class=""><br class="">This way, after you have tested that a variable of type snode<br class="">is bound to sexp, you could pass an sexp_info to other predicates;<br class="">you wouldn't have to pass the whole snode.<br class=""><br class="">I find this solution to be better when there is a lot of code<br class="">that needs to work with the info associated with one function symbol<br class="">(sexp in this case) that does not care about the other function symbols<br class="">in that type. Of course, I don't know whether that is the case in your application.<br class=""><br class="">Zoltan.</div></div></blockquote></div><br class=""></div></body></html>