Prolog add to list if element is not equal to string -


i trying create list of pairs have non-null guard element.

get_only_guarded(l) :-     guard \= null,     findall([s,d],transition(s,d,_,guard,_),l). 

this ive tried doesnt seem work. correct way?

use dif(guard,null) instead. handle (\=)/2 care!


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -