An open API service indexing awesome lists of open source software.

https://github.com/mndrix/list_util

Prolog list utility predicates
https://github.com/mndrix/list_util

lists prolog

Last synced: about 2 months ago
JSON representation

Prolog list utility predicates

Awesome Lists containing this project

README

          

# Synopsis

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

# 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](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-List.html)
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.

# Installation

Using SWI-Prolog 6.3 or later:

?- pack_install(list_util).

This module uses [semantic versioning](http://semver.org/).

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