On this page:
8.18
top
up next →

2list moduleπŸ”— i

procedure

( stx-length stx)(or/cinteger? #f)

stx:syntax?
Get the length of syntax if it’s list-like syntax, or returns #f.

Examples:
> (stx-length #'(123))

3

> (stx-length #'(ab(cd)e))

4

> (stx-length #'a)

#f

> (stx-length #'())

0

procedure

( stx-length=? leftright)boolean?

left:syntax?
right:syntax?
Compare the length of left and right is different, and notice if one of left or right is not list-like syntax, than the result is always #f.

Examples:
> (stx-length=? #'(123)#'(abc))

#t

> (stx-length=? #'(123)#'())

#f

> (stx-length=? #'(123)#'a)

#f

> (stx-length=? #'a#'b)

#f

procedure

( stx-length<=? leftright)boolean?

left:syntax?
right:syntax?
Just like stx-length=? but for <= relation.

Examples:
> (stx-length<=? #'(1)#'(abc))

#t

> (stx-length<=? #'(123)#'())

#f

procedure

( stx-length>=? leftright)boolean?

left:syntax?
right:syntax?
Just like stx-length=? but for >= relation.

Examples:
> (stx-length>=? #'(1)#'(abc))

#f

> (stx-length>=? #'(123)#'())

#t

top
up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /