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
- Host: GitHub
- URL: https://github.com/mndrix/list_util
- Owner: mndrix
- License: unlicense
- Archived: true
- Created: 2012-12-27T22:33:57.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T02:42:16.000Z (over 7 years ago)
- Last Synced: 2025-11-07T14:01:50.154Z (2 months ago)
- Topics: lists, prolog
- Language: Prolog
- Size: 119 KB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-prolog - list_util - List utility predicates. (Utilities)
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