Skip to content
Permalink
Browse files

Avoid a spurious steadfasness warning in the library `list` object

  • Loading branch information...
pmoura committed Mar 15, 2019
1 parent 4ad431d commit 5afc28cb632e3525b9d24046f5fbe4e6e21dd942
Showing with 15 additions and 13 deletions.
  1. +1 −1 docs/_sources/index.rst.txt
  2. +2 −2 docs/_sources/list_0.rst.txt
  3. +1 −1 docs/index.html
  4. +2 −2 docs/list_0.html
  5. +1 −1 docs/searchindex.js
  6. +8 −6 library/list.lgt
@@ -17,4 +17,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`search`

Generated on Wed Mar 13 11:51:19 WET 2019
Generated on Fri Mar 15 14:59:37 WET 2019
@@ -9,8 +9,8 @@
List predicates.

| **Author:** Paulo Moura
| **Version:** 2.17
| **Date:** 2019/3/6
| **Version:** 2.18
| **Date:** 2019/3/15

| **Compilation flags:**
| ``static, context_switching_calls``
@@ -2860,7 +2860,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
<p>Generated on Wed Mar 13 11:51:19 WET 2019</p>
<p>Generated on Fri Mar 15 14:59:37 WET 2019</p>
</div>


@@ -313,8 +313,8 @@ <h1><code class="docutils literal notranslate"><span class="pre">list</span></co
<p>List predicates.</p>
<div class="line-block">
<div class="line"><strong>Author:</strong> Paulo Moura</div>
<div class="line"><strong>Version:</strong> 2.17</div>
<div class="line"><strong>Date:</strong> 2019/3/6</div>
<div class="line"><strong>Version:</strong> 2.18</div>
<div class="line"><strong>Date:</strong> 2019/3/15</div>
</div>
<div class="line-block">
<div class="line"><strong>Compilation flags:</strong></div>

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -23,9 +23,9 @@
extends(compound)).

:- info([
version is 2.17,
version is 2.18,
author is 'Paulo Moura',
date is 2019/03/06,
date is 2019/03/15,
comment is 'List predicates.',
see_also is [list(_), numberlist, varlist, difflist],
remarks is [
@@ -597,15 +597,17 @@
; type_error(list, Term)
).

take(0, _, []) :-
!.
take(0, _, Elements) :-
!,
Elements = [].
take(N, [Element| Tail], [Element| Elements]) :-
N > 0,
M is N - 1,
take(M, Tail, Elements).

drop(0, List, List) :-
!.
drop(0, List, Remaining) :-
!,
Remaining = List.
drop(N, [_| Tail], Remaining) :-
N > 0,
M is N - 1,

0 comments on commit 5afc28c

Please sign in to comment.
You can’t perform that action at this time.