On Thu, Jan 01, 2015 at 10:46:44AM +0100, Alexander Burger wrote:
> You can use '@' as a placeholder to ignore parts of a pattern:
> 
>    (let (((A . @) @ @ D) '((1 2 3) (4 5 6) 7 8 9))
>       (trail T) )
>    -> (A 1 D 8)
> 
> '@' is not bound to the matching values and thus saves stack space.

Please note that I changed '@' to 'NIL' for "don't care" positions.

The above example should now be written as

   (let (((A . NIL) NIL NIL D) '((1 2 3) (4 5 6) 7 8 9))
      (trail T) )
   -> (A 1 D 8)

or, in the equivalent form,

   (let (((A) NIL NIL D) '((1 2 3) (4 5 6) 7 8 9))
      (trail T) )
   -> (A 1 D 8)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe

Reply via email to