Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Prolog list utility predicates
Prolog
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
prolog
t
.gitignore
LICENSE
README.md
pack.pl

README.md

Synopsis

:- use_module(list_util, [take/3]).
main :-
    take([hello, world, etc], 2, Words),
    writeln(Words).

Description

Prolog code works with lots of lists. This is a collection of predicates that I've found useful from time to time across projects.

Some of these predicates are inspired by functions in Haskell's Data.List library. Prolog's reversible predicates allow us to get by with fewer definitions than Haskell needs.

See list_util.pl documentation below for details about each exported predicate.

Changes in this Version

* Add span/4
* Add drop_while/3

Installation

Using SWI-Prolog 6.3 or later:

?- pack_install(list_util).

This module uses semantic versioning.

Source code available and pull requests accepted at http://github.com/mndrix/list_util

Something went wrong with that request. Please try again.