On this page:
2.1 Threading Base
~>
and~>
~>>
and~>>
lambda~>
lambda~>>
lambda-and~>
lambda-and~>>
lambda~>*
lambda~>>*
lambda-and~>*
lambda-and~>>*
2.2 Threading Condition
when~>
unless~>
cond~>
2.3 Threading Extra
tee~>
9.1

2 Threading Macros🔗ℹ

 (require ebb/threading) package: ebb-lib

This module provides all the threading macro compatibility layers from ebb/threading/base, ebb/threading/cond and ebb/threading/extra.

2.1 Threading Base🔗ℹ

 (require ebb/threading/base) package: ebb-lib

This module provides the basic threading macros for left and right threading with and without short-circuiting. It also provides all the lambda forms provided by threading library.

syntax

(~> expr ...)

Uses ebb to provide compatibility with the original threading macro.

syntax

(and~> expr ...)

Uses ebb/and to provide compatibility with the original short-circuiting threading macro.

syntax

(~>> expr ...)

Uses ebb> to provide compatibility with the original, now deprecated, right-threading macro.

syntax

(and~>> expr ...)

Uses ebb>/and to provide compatibility with the original, now deprecated, short-circuiting, right-threading macro.

syntax

(lambda~> expr ...)

Combines lambda and ~> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda (v) (~> v expr ...))

syntax

(lambda~>> expr ...)

Combines lambda and ~>> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda (v) (~>> v expr ...))

syntax

(lambda-and~> expr ...)

Combines lambda and and~> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda (v) (and~> v expr ...))

syntax

(lambda-and~>> expr ...)

Combines lambda and and~>> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda (v) (and~>> v expr ...))

syntax

(lambda~>* expr ...)

Combines lambda and ~> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda vs (~> vs expr ...))

syntax

(lambda~>>* expr ...)

Combines lambda and ~>> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda vs (~>> vs expr ...))

syntax

(lambda-and~>* expr ...)

Combines lambda and and~> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda vs (and~> vs expr ...))

syntax

(lambda-and~>>* expr ...)

Combines lambda and and~>> to provide similar functionality as the original threading macro. It is equivalent to:

(lambda vs (~>> vs expr ...))

2.2 Threading Condition🔗ℹ

 (require ebb/threading/cond) package: ebb-lib

This module provides the conditional forms like the original threading library does.

syntax

(when~> val condition expr ...)

If given condition evaluates to #f then the value val is returned. Otherwise the result is threading the value through the expressions expr .... This is the same functionality as the original threading library provides.

syntax

(unless~> val cond expr ...)

Inverted version of when~>.

syntax

(cond~> val (condition expr ...) ... maybe-else)

 
maybe-else = 
  | (else elsexpr ...)
Threads value val through expressions of matching expressions or else expressions if no condition matches. If no condition matches and there is no else branch, the value is returned as-is. This is the same behaviour as the original threading library provides.

2.3 Threading Extra🔗ℹ

 (require ebb/threading/extra) package: ebb-lib

This module provides the extra forms like the original threading library does.

syntax

(tee~> expr0 expr ...)

Evaluates to the result of expr0 while all the following expressions expr ... are evaluated only for their side effects like the original threading macro does.