sigildocs

(sigil spec)

(sigil spec) - Procedure Specification Utilities

Provides utilities for working with procedure specs — machine-readable predicate-based annotations on procedures.

(import (sigil spec))

(define (add a b)
  (: number? number? -> number?)
  (+ a b))

(spec->string (procedure-spec add))  ; => "number? number? -> number?"

Exports

spec->stringprocedure

Format a spec list as a readable string.

Converts a spec list (as returned by procedure-spec) into a human-readable string representation.

(spec->string '(number? number? -> number?))  ; => "number? number? -> number?"
(spec->string '(string? (end: integer?) -> string?))
; => "string? (end: integer?) -> string?"
void?procedure

Test if a value is void (the undefined value).

Returns #t if x is the void/undefined value (produced by (if #f #f)).

(void? (if #f #f))  ; => #t
(void? 42)          ; => #f
any?variable

(No description)

any-ofvariable

(No description)

none-ofvariable

(No description)

maybevariable

(No description)

list-ofvariable

(No description)