▼ |  | Unstable: May Change Without Warning

1 | Guidelines for Developing unstable Libraries
2 | Automata: Compiling State Machines
3 | Bytes
4 | Contracts
5 | Contracts for Macro Subexpressions
6 | Debugging
7 | Definitions
8 | Errors
9 | Filesystem
10 | Find
11 | Flonums
12 | Futures
13 | Functions
14 | Hash Tables
15 | Interface-Oriented Programming for Classes
16 | Lazy Require
17 | Lists
18 | Logging
19 | Macro Testing
20 | Mark Parameters
21 | Match
22 | Open place expressions
23 | Options
24 | Parameter Groups
25 | Pretty-Printing
26 | Re-Contracting Identifiers
27 | Sandbox
28 | Sequences
29 | Strings
30 | Structs
31 | Struct Printing
32 | Syntax
33 | Temporal Contracts: Explicit Contract Monitors
34 | Unix Domain Sockets
35 | 2D Syntax
36 | GUI Libraries

► | 13 | Functions

13.1 | Higher Order Predicates

On this page:

13.1`` Higher Order Predicates
conjoin
disjoin

5.3.6
top ← prev up next →

### 13`` Functions

Carl Eastlund <cce@racket-lang.org>

This library is unstable; compatibility will not be maintained. See Unstable: May Change Without Warning for more information.

(require unstable/function)

This module provides tools for higher-order programming and creating functions.

#### 13.1`` Higher Order Predicates

> > procedure

> > ((conjoin f ...) x ...) → boolean?

> f : (-> A ... boolean?)
> x : A

Combines calls to each function with and. Equivalent to (and (f x ...) ...)

Examples:

> (define f (conjoin exact? integer?))

> > (f 1)
> #t
> > (f 1.0)
> #f
> > (f 1/2)
> #f
> > (f 0.5)
> #f

> > procedure

> > ((disjoin f ...) x ...) → boolean?

> f : (-> A ... boolean?)
> x : A

Combines calls to each function with or. Equivalent to (or (f x ...) ...)

Examples:

> (define f (disjoin exact? integer?))

> > (f 1)
> #t
> > (f 1.0)
> #t
> > (f 1/2)
> #t
> > (f 0.5)
> #f

top ← prev up next →