| Did you know ... | Search Documentation: |
| basics.pl -- XSB basics.P emulation |
This module provides the XSB basics module. The implementation either
simply uses SWI-Prolog built-ins and libraries or is copied from the XSB
file.
for(?I, +B1, +B2)
ith(?Index, +List, ?Element)The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
member(?Elem, ?List)
member(X, [One]).
append(?List1, ?List2, ?List1AndList2)
select(?Elem, ?List1, ?List2)
reverse(?List1, ?List2)
flatten(+NestedList, -FlatList) is det[] is distinct
from '[]'.
Ending up needing flatten/2 often indicates, like append/3 for appending two lists, a bad design. Efficient code that generates lists from generated small lists must use difference lists, often possible through grammar rules for optimal readability.
subset(+SubSet, +Set) is semidetThe following predicates are exported, but not or incorrectly documented.
logk_ith(Arg1, Arg2, Arg3, Arg4)
comma_length(Arg1, Arg2)
comma_to_list(Arg1, Arg2)
abscomma_memberchk(Arg1, Arg2)
comma_memberchk(Arg1, Arg2)
log_ith_new(Arg1, Arg2, Arg3)
log_ith(Arg1, Arg2, Arg3)
log_ith_bound(Arg1, Arg2, Arg3)
log_ith_to_list(Arg1, Arg2)
comma_member(Arg1, Arg2)
comma_append(Arg1, Arg2, Arg3)