Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Predicates for working with lists |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.13.0 |
SHA1 sum: | 9b02aea7f989ccf451ac230e29885056b1a74f03 |
Author: | Michael Hendricks <michael@ndrix.org> |
Maintainer: | Michael Hendricks <michael@ndrix.org> |
Packager: | Michael Hendricks <michael@ndrix.org> |
Home page: | https://github.com/mndrix/list_util |
Download URL: | https://github.com/mndrix/list_util/archive/v0.13.0.zip |
No reviews. Create the first review!.
:- use_module(list_util, [take/3]). ?- take(2, [hello, world, etc], Words). Words = [hello, world].
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.
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
Pack contains 38 files holding a total of 49.5K bytes.