lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double Parenthesis


From: Thomas Morley
Subject: Re: Double Parenthesis
Date: Sun, 9 Feb 2020 15:32:58 +0100

Am So., 9. Feb. 2020 um 15:02 Uhr schrieb Freeman Gilmore
<address@hidden>:
>
>
>
> This is taken from the "Scheme Book".
>
> Question why double parenthesis  for  let ((rand (random 100))) ?
>
> Thank you, ƒg

Well, every expression needs to be wrapped into parenthesis.

One pair for the let-expression:
(let ...)

One pair for all local-bindings:
(let (all-local-bindings) ...)

One pair for each single local binding, note every local binding is of
type key-value:
(let (  (key1 value1) (key2 value2) ) ...)

Every value my be a procedure call, with the need for another pair of
parenthesis:
(let ( (key1 (proc1 args1)) (key2 (proc2 args2)) ) ...)

Proper indentation increases readability:
(let (
      (key1 (proc1 args1))
      (key2 (proc2 args2))
     )
   ...
   )

HTH,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]