• 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

4.9 Delimited continuations
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Delimited continuations
          • reset/3
          • shift/1
          • shift_for_copy/1
    • Packages
Availability:built-in
Sourcereset(:Goal, ?Ball, -Continuation)
Call Goal. If Goal calls shift/1 and the argument of shift/1 can be unified with Ball,80The argument order described in Schrijvers et al., 2013 is reset(Goal,Continuation,Ball). We swapped the argument order for compatibility with catch/3 shift/1 causes reset/3 to return, unifying Continuation with a goal that represents the continuation after shift/1. In other words, meta-calling Continuation completes the execution where shift left it. If Goal does not call shift/1, Continuation are unified with the integer 0 (zero).81Note that older versions also unify Ball with 0. Testing whether or not shift happened on Ball however is always ambiguous.
ClioPatria (version V3.1.1-51-ga0b30a5)