6.2.901.900
3 Extra Utilities
3.1 The true? Predicate
(require alexis/bool) | package: alexis-util |
(require typed/alexis/bool) |
3.2 Pattern Matching in Simple Functions
(require alexis/util/match) | package: alexis-util |
syntax
(define/match* (head-id args) body)
args = match-expr ... | match-expr ... . rest-expr
Equivalent to:
where args* is a list of unique identifiers generated corresponding to each arg.
3.3 Abbreviation Macros
(require alexis/util/abbreviations) | |
package: alexis-util |
This module provides various simple abbreviations to make writing Racket code clearer and easier. These forms should work in both Racket and Typed Racket.
syntax
(loop-forever body)
Equivalent to:
(let loop () body (loop))
syntax
(async body)
Equivalent to:
syntax
(async-loop body)
Equivalent to:
(thread (thunk (loop-forever body)))
syntax
(with-semaphore semaphore-expr body)
Equivalent to:
(call-with-semaphore semaphore-expr (thunk body))
3.4 Threading Macros
(require alexis/util/threading) | package: alexis-util |
NOTE: This library is deprecated; use threading, instead. This module re-exports ~>, ~>>, and~>, and~>>, lambda~>, λ~>, lambda~>*, λ~>*, lambda~>>, λ~>>, lambda~>>*, λ~>>*, lambda-and~>, λ-and~>, lambda-and~>*, λ-and~>*, lambda-and~>>, λ-and~>>, lambda-and~>>*, and λ-and~>>* from threading for backwards-compatibility.