/usr/local/lib/swipl/library/lazy_lists.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl -- Examine Prolog source-files
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl
      • aggregate.pl
      • yall.pl
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl -- Lazy list handling
        • lazy_list/2
        • lazy_list/3
        • lazy_list_materialize/1
        • lazy_list_length/2
        • lazy_list_iterator/4
        • lazy_get_codes/4
        • lazy_read_terms/4
        • lazy_read_lines/4
        • lazy_message_queue/4
        • lazy_engine_next/4
        • lazy_findall/3
        • lazy_findall/4
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl -- A package manager for Prolog
      • git.pl
      • utf8.pl
      • dialect.pl
      • system.pl
      • terms.pl
      • date.pl
      • persistency.pl -- Provide persistent dynamic predicates
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl -- Dict utilities
      • dif.pl -- The dif/2 constraint
      • varnumbers.pl
      • pio.pl
      • base32.pl -- Base32 encoding and decoding
      • charsio.pl -- I/O on Lists of Character Codes
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • backcomp.pl -- Backward compatibility
      • ctypes.pl -- Character code classification
      • check.pl
      • threadutil.pl -- Interactive thread utilities
      • hashtable.pl
      • rwlocks.pl
      • portray_text.pl
      • thread.pl -- High level thread primitives
      • macros.pl
      • fastrw.pl
      • oset.pl
      • prolog_profile.pl
      • prolog_coverage.pl
      • tables.pl
      • help.pl
      • optparse.pl
      • make.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • prolog_trace.pl
      • qsave.pl
      • zip.pl
      • prolog_autoload.pl
      • nb_set.pl -- Non-backtrackable sets
      • streams.pl -- Manage Prolog streams
      • writef.pl
      • listing.pl
      • quintus.pl
      • shell.pl
      • increval.pl
      • readln.pl
      • explain.pl
      • edit.pl
      • prolog_wrap.pl
      • strings.pl
 lazy_list(:Next, -List)
Create a lazy list from a callback. Next is called repeatedly to extend the list. It is called as call(Next, List, Tail), where the difference list List\Tail produces the next slice of the list. If the end of the input is reached, List must be a proper list and Tail must be [].
bug
- The content returned by the iterator is duplicated in nb_setarg/3. This is needed by avoid the risk of trailed assignments in the structure. Avoiding this duplication would significantly reduce the overhead.