Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: with-shadowed-variable , Previous: with-lin-midi-fn , Up: W-Y , Home: Overview

Clamps Dictionary

with-props

Macro

(with-props vars proplist &body body)

Like with-slots but using a property list instead of a class instance. The properties in the proplist to be used need to have a symbol or a keyword as a key. vars is a list of symbols bound to the corresponding property values in the lexical scope of body. Each element of vars corresponds to a key in proplist either being the binding symbol itself or a keyword, derived by prepending a colon to the binding symbol.

Arguments

vars List of symbols of the Properties to use in the lexical scope of body.
proplist Property list containing bound properties.
body The body in which the vars are bound.

Example

(with-props (a b c) '(:a 1 :b 2 c 3)
  (list a b c))
;; => (1 2 3)

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate