▼ |  | Unstable: May Change Without Warning

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

► | 14 | Functions

14.1 | Higher Order Predicates

On this page:

14.1`` Higher Order Predicates
conjoin
disjoin

Version: 5.3.1
top ← prev up next →

### 14`` 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.

#### 14.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 →