☰

*ON THIS PAGE*# Lists of numbers

**Author(s):** The Ciao Development Team.## Usage and interface

## Documentation on exports

## Documentation on imports

This module has the following direct dependencies:

This module implements some kinds of lists of numbers.

**Library usage:**`:- use_module(library(numlists)).`**Exports:***Predicates:*`get_primes/2`,`sum_list/2`,`sum_list/3`,`sum_list_of_lists/2`,`sum_list_of_lists/3`.*Regular Types:*`intlist/1`,`numlist/1`.

PREDICATEget_primes/2

Usage:`get_primes(N,Primes)`

Computes the Nth first prime numbers in ascending order.

*The following properties should hold at call time:*

(`basic_props:int/1`)N is an integer.*The following properties should hold upon exit:*

(`numlists:intlist/1`)Primes is a list of integers.

REGTYPEintlist/1

Usage:`intlist(X)`

X is a list of integers.

REGTYPEnumlist/1

Usage:`numlist(X)`

X is a list of numbers.

PREDICATEsum_list/2

Usage:`sum_list(List,N)`

N is the total sum of the elements of List.

*The following properties should hold at call time:*

(`numlists:numlist/1`)List is a list of numbers.*The following properties should hold upon exit:*

(`basic_props:num/1`)N is a number.

PREDICATEsum_list/3

Usage:`sum_list(List,N0,N)`

N is the total sum of the elements of List plus N0.

*The following properties should hold at call time:*

(`numlists:numlist/1`)List is a list of numbers.

(`basic_props:num/1`)N0 is a number.*The following properties should hold upon exit:*

(`basic_props:num/1`)N is a number.

PREDICATEsum_list_of_lists/2

Usage:`sum_list_of_lists(Lists,N)`

N is the total sum of the elements of the lists of Lists.

*The following properties should hold at call time:*

(`basic_props:list/2`)List is a list of numlists.*The following properties should hold upon exit:*

(`basic_props:num/1`)N is a number.

PREDICATEsum_list_of_lists/3

Usage:`sum_list_of_lists(Lists,N0,N)`

N is the total sum of the elements of the lists of Lists plus N0.

*The following properties should hold at call time:*

(`basic_props:list/2`)List is a list of numlists.

(`basic_props:num/1`)N0 is a number.*The following properties should hold upon exit:*

(`basic_props:num/1`)N is a number.

*System library modules:*`lists`.*Packages:*`prelude`,`initial`,`condcomp`,`assertions`,`assertions/assertions_basic`,`regtypes`.

Generated with LPdoc using Ciao