A stoics.infrastructure prolog pack

This is a stoics infrastructure pack for SWI-Prolog that provides a medley of generic library predicates that are used by other stoics packs. A novelty of the library is that specific preds and their code-dependencies can be loaded into memory without loading the pack's whole code base.



Within SWI it is highly recommended that you install from within by using its package manager.
To install simply do:


   ?- pack_install(stoics_lib).   % also installs pack(lib) if not present

   and then load with:

   ?- use_module(library(lib)).
   ?- lib(stoics_lib).
The pack itself does not load much code- only a couple of informational predicates (see docs below).


To test loading code
   ?- lib(stoics_lib:kv_decompose/3).
   ?- kv_decompose([a-1,b-2,c-3], Ls, Ns ).
   Ls = [a, b, c],
   Ns = [1, 2, 3].

To load code without the pack prefix
   ?- lib_pack_load_index(stoics_lib).
   ?- lib(compose/3).
   ?- kv_compose([a,b,c], [1,2,3], LNs).
   LNs = [a-1,b-2,c-3].

For more info on how to access the stoics_lib predicates from within your own packs see docs for pack(lib)


module documentation: stoics_lib.html
sources: stoics_lib
github: stoics.infra


Nicos Angelopoulos