predicates

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: BSD-2-Clause, MIT Imports: 5 Imported by: 0

README

predicates GoDoc

import "github.com/guregu/predicates"

Native predicates for ichiban/prolog.

Implemented

  • between/3
  • consult/1 using io/fs.FS

License

BSD 2-clause. Includes code from ichiban/prolog (MIT license). See LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Between

func Between(lower, upper, value engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise

Between (between/3) succeeds when lower, upper, and value are all integers, and lower <= value <= upper. If value is a variable, it is unified with successive integers from lower to upper.

between(+Lower, +Upper, -Value).

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS contains replacements for some built-in predicates that use the io/fs interface instead of the OS.

func NewFS

func NewFS(fsys fs.FS, i *prolog.Interpreter) FS

func (FS) Consult

func (ff FS) Consult(files engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise

consult/1.

func (FS) Register

func (ff FS) Register()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL