• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.56 library(solution_sequences): Modify solution sequences
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(solution_sequences): Modify solution sequences
          • distinct/1
          • distinct/2
          • reduced/1
          • reduced/3
          • limit/2
          • offset/2
          • call_nth/2
          • order_by/2
          • group_by/4
    • Packages
Availability::- use_module(library(solution_sequences)).(can be autoloaded)
Sourceorder_by(+Spec, :Goal)
Order solutions according to Spec. Spec is a list of terms, where each element is one of. The ordering of solutions of Goal that only differ in variables that are not shared with Spec is not changed.
asc(Term)
Order solution according to ascending Term
desc(Term)
Order solution according to descending Term

This predicate is based on findall/3 and (thus) variables in answers are copied.

ClioPatria (version V3.1.1-51-ga0b30a5)