Package: graphene

Macro graphene:with-points

Lambda List

graphene:with-points (vars &body body)

Syntax

(graphene:with-points (p1 p2 p3 ... pn) body) => result

Arguments

p1 ... pn -- the newly created graphene:point-t instances
body -- a body that uses the bindings p1 ... pn

Details

The graphene:with-points macro creates new variable bindings and executes the body that use these bindings. The macro performs the bindings sequentially, like the let* macro.

Each point can be initialized with values using the syntax for the graphene:with-point macro. See also the graphene:with-point documentation.

Example

(graphene:with-points (p1 (p2 1.2 1.3) (p3 p2))
  (list (list (graphene:point-x p1) (graphene:point-y p1))
        (list (graphene:point-x p2) (graphene:point-y p2))
        (list (graphene:point-x p3) (graphene:point-y p3))))
=> ((0.0 0.0) (1.2 1.3) (1.2 1.3))    
 

See also

2024-1-20