The rail Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The rail Reference Manual

This is the rail Reference Manual, version 0.0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:20:42 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

1.1 rail

Author

Marcin Radoszewski

License

MIT

Description

Library implementing functions for railway oriented programming.

Version

0.0.1

Source

rail.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.1 rail.asd

Location

rail.asd

Systems

rail (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.2 rail/package.lisp

Parent

rail (system)

Location

package.lisp

Packages

rail


Previous: , Up: Lisp files   [Contents][Index]

2.1.3 rail/rail.lisp

Dependency

package.lisp (file)

Parent

rail (system)

Location

rail.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

3 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

3.1 rail

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

4.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.1 Functions

Function: bind F BRANCH

Given function f (value -> branch) applies it on success branch

Package

rail

Source

rail.lisp (file)

Function: fail MESSAGES

Create fail branch.

Package

rail

Source

rail.lisp (file)

Function: fail-if-nil FAIL-MESSAGE VALUE

Creates branch from a value. If value is nil then fails with given message

Package

rail

Source

rail.lisp (file)

Function: fail? BRANCH
Package

rail

Source

rail.lisp (file)

Function: failure-tee F B

Alias for failure-side-effect

Package

rail

Source

rail.lisp (file)

Function: flat-map F BRANCH

Alias for bind

Package

rail

Source

rail.lisp (file)

Function: fmap F BRANCH

Alias for lift.

Package

rail

Source

rail.lisp (file)

Function: lift F BRANCH

Given a function f : applies it to value stored in branch

Package

rail

Source

rail.lisp (file)

Function: map-messages F BRANCH

Given a function (f : (messages) -> messages) applies function to branch messages

Package

rail

Source

rail.lisp (file)

Function: map-success F BRANCH

Given a function (f : (value messages) -> branch) transforms success branch and returns a resulting branch

Package

rail

Source

rail.lisp (file)

Function: merge-messages MSGS BRANCH

Merges additional messages to the branch

Package

rail

Source

rail.lisp (file)

Function: succeed VALUE &optional MESSAGES

Create a success branch. Optionally with messages.

Package

rail

Source

rail.lisp (file)

Function: success-tee F B

Alias for success-side-effect

Package

rail

Source

rail.lisp (file)

Function: success? BRANCH
Package

rail

Source

rail.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.2 Generic functions

Generic Function: branch-messages OBJECT
Generic Function: (setf branch-messages) NEW-VALUE OBJECT
Package

rail

Methods
Method: branch-messages (BRANCH branch)

automatically generated reader method

Source

rail.lisp (file)

Method: (setf branch-messages) NEW-VALUE (BRANCH branch)

automatically generated writer method

Source

rail.lisp (file)

Generic Function: branch-name OBJECT
Generic Function: (setf branch-name) NEW-VALUE OBJECT
Package

rail

Methods
Method: branch-name (BRANCH branch)

automatically generated reader method

Source

rail.lisp (file)

Method: (setf branch-name) NEW-VALUE (BRANCH branch)

automatically generated writer method

Source

rail.lisp (file)

Generic Function: branch-value OBJECT
Generic Function: (setf branch-value) NEW-VALUE OBJECT
Package

rail

Methods
Method: branch-value (SUCCESS success)

automatically generated reader method

Source

rail.lisp (file)

Method: (setf branch-value) NEW-VALUE (SUCCESS success)

automatically generated writer method

Source

rail.lisp (file)

Generic Function: either F-SUCCESS F-FAILURE BRANCH

Applies f-success if on success branch of f-failure if on failure branch. f-success takes value and a list of messages and should return a branch. f-failure takes list of messages and returns a branch.

Package

rail

Source

rail.lisp (file)

Methods
Method: either (F-SUCCESS function) (F-FAILURE function) (BRANCH failure)
Method: either (F-SUCCESS function) (F-FAILURE function) (BRANCH success)
Generic Function: failure-side-effect F BRANCH

Given a function f : (messages) -> any and a branch
applies the function to the success branch and returns result unchanged

Package

rail

Source

rail.lisp (file)

Methods
Method: failure-side-effect (F function) (B branch)
Method: failure-side-effect (F function) (B failure)
Generic Function: fapply F-BRANCH V-BRANCH

Applies function (value -> value) stored as a value in f-branch to value stored in v-branch.

Package

rail

Source

rail.lisp (file)

Methods
Method: fapply (F-BRANCH branch) (V-BRANCH branch)
Method: fapply (F-BRANCH success) (V-BRANCH success)
Generic Function: get-or-default DEFAULT BRANCH

Returns the value from success branch or default for failure branch.

Package

rail

Source

rail.lisp (file)

Methods
Method: get-or-default DEFAULT (B failure)
Method: get-or-default DEFAULT (B success)
Generic Function: get-or-default-f DEFAULT-F BRANCH

Returns the value from success branch or computed value from default-f function for failure

Package

rail

Source

rail.lisp (file)

Methods
Method: get-or-default-f (DEFAULT-F function) (B failure)
Method: get-or-default-f (DEFAULT-F function) (B success)
Generic Function: success-side-effect F BRANCH

Given a function f : (value, messages) -> any and a branch
applies the function to the success branch and returns result unchanged

Package

rail

Source

rail.lisp (file)

Methods
Method: success-side-effect (F function) (B branch)
Method: success-side-effect (F function) (B success)

Previous: , Up: Exported definitions   [Contents][Index]

4.1.3 Classes

Class: failure ()
Package

rail

Source

rail.lisp (file)

Direct superclasses

branch (class)

Direct methods
Direct slots
Slot: name
Initform

:failure

Class: success ()
Package

rail

Source

rail.lisp (file)

Direct superclasses

branch (class)

Direct methods
Direct slots
Slot: name
Initform

:success

Slot: value
Initargs

:value

Readers

branch-value (generic function)

Writers

(setf branch-value) (generic function)


Previous: , Up: Definitions   [Contents][Index]

4.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.1 Generic functions

Generic Function: branch-copy BRANCH &key MESSAGES VALUE

Copies given branch and gives the ability to update it’s contents

Package

rail

Source

rail.lisp (file)

Methods
Method: branch-copy (BRANCH failure) &key MESSAGES
Method: branch-copy (BRANCH success) &key VALUE MESSAGES

Previous: , Up: Internal definitions   [Contents][Index]

4.2.2 Classes

Class: branch ()
Package

rail

Source

rail.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

branch-name (generic function)

Writers

(setf branch-name) (generic function)

Slot: messages
Initargs

:messages

Readers

branch-messages (generic function)

Writers

(setf branch-messages) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   R  
Index Entry  Section

F
File, Lisp, rail.asd: The rail<dot>asd file
File, Lisp, rail/package.lisp: The rail/package<dot>lisp file
File, Lisp, rail/rail.lisp: The rail/rail<dot>lisp file

L
Lisp File, rail.asd: The rail<dot>asd file
Lisp File, rail/package.lisp: The rail/package<dot>lisp file
Lisp File, rail/rail.lisp: The rail/rail<dot>lisp file

R
rail.asd: The rail<dot>asd file
rail/package.lisp: The rail/package<dot>lisp file
rail/rail.lisp: The rail/rail<dot>lisp file

Jump to:   F   L   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   E   F   G   L   M   S  
Index Entry  Section

(
(setf branch-messages): Exported generic functions
(setf branch-messages): Exported generic functions
(setf branch-name): Exported generic functions
(setf branch-name): Exported generic functions
(setf branch-value): Exported generic functions
(setf branch-value): Exported generic functions

B
bind: Exported functions
branch-copy: Internal generic functions
branch-copy: Internal generic functions
branch-copy: Internal generic functions
branch-messages: Exported generic functions
branch-messages: Exported generic functions
branch-name: Exported generic functions
branch-name: Exported generic functions
branch-value: Exported generic functions
branch-value: Exported generic functions

E
either: Exported generic functions
either: Exported generic functions
either: Exported generic functions

F
fail: Exported functions
fail-if-nil: Exported functions
fail?: Exported functions
failure-side-effect: Exported generic functions
failure-side-effect: Exported generic functions
failure-side-effect: Exported generic functions
failure-tee: Exported functions
fapply: Exported generic functions
fapply: Exported generic functions
fapply: Exported generic functions
flat-map: Exported functions
fmap: Exported functions
Function, bind: Exported functions
Function, fail: Exported functions
Function, fail-if-nil: Exported functions
Function, fail?: Exported functions
Function, failure-tee: Exported functions
Function, flat-map: Exported functions
Function, fmap: Exported functions
Function, lift: Exported functions
Function, map-messages: Exported functions
Function, map-success: Exported functions
Function, merge-messages: Exported functions
Function, succeed: Exported functions
Function, success-tee: Exported functions
Function, success?: Exported functions

G
Generic Function, (setf branch-messages): Exported generic functions
Generic Function, (setf branch-name): Exported generic functions
Generic Function, (setf branch-value): Exported generic functions
Generic Function, branch-copy: Internal generic functions
Generic Function, branch-messages: Exported generic functions
Generic Function, branch-name: Exported generic functions
Generic Function, branch-value: Exported generic functions
Generic Function, either: Exported generic functions
Generic Function, failure-side-effect: Exported generic functions
Generic Function, fapply: Exported generic functions
Generic Function, get-or-default: Exported generic functions
Generic Function, get-or-default-f: Exported generic functions
Generic Function, success-side-effect: Exported generic functions
get-or-default: Exported generic functions
get-or-default: Exported generic functions
get-or-default: Exported generic functions
get-or-default-f: Exported generic functions
get-or-default-f: Exported generic functions
get-or-default-f: Exported generic functions

L
lift: Exported functions

M
map-messages: Exported functions
map-success: Exported functions
merge-messages: Exported functions
Method, (setf branch-messages): Exported generic functions
Method, (setf branch-name): Exported generic functions
Method, (setf branch-value): Exported generic functions
Method, branch-copy: Internal generic functions
Method, branch-copy: Internal generic functions
Method, branch-messages: Exported generic functions
Method, branch-name: Exported generic functions
Method, branch-value: Exported generic functions
Method, either: Exported generic functions
Method, either: Exported generic functions
Method, failure-side-effect: Exported generic functions
Method, failure-side-effect: Exported generic functions
Method, fapply: Exported generic functions
Method, fapply: Exported generic functions
Method, get-or-default: Exported generic functions
Method, get-or-default: Exported generic functions
Method, get-or-default-f: Exported generic functions
Method, get-or-default-f: Exported generic functions
Method, success-side-effect: Exported generic functions
Method, success-side-effect: Exported generic functions

S
succeed: Exported functions
success-side-effect: Exported generic functions
success-side-effect: Exported generic functions
success-side-effect: Exported generic functions
success-tee: Exported functions
success?: Exported functions

Jump to:   (  
B   E   F   G   L   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   M   N   S   V  
Index Entry  Section

M
messages: Internal classes

N
name: Exported classes
name: Exported classes
name: Internal classes

S
Slot, messages: Internal classes
Slot, name: Exported classes
Slot, name: Exported classes
Slot, name: Internal classes
Slot, value: Exported classes

V
value: Exported classes

Jump to:   M   N   S   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   F   P   R   S  
Index Entry  Section

B
branch: Internal classes

C
Class, branch: Internal classes
Class, failure: Exported classes
Class, success: Exported classes

F
failure: Exported classes

P
Package, rail: The rail package

R
rail: The rail system
rail: The rail package

S
success: Exported classes
System, rail: The rail system

Jump to:   B   C   F   P   R   S