functional programming - No operation in Scheme Language -


i having trouble in how define no operation in scheme language

like ; in c

i want this:

   (cond    [(null? exp)  nop ]     .....    ) 

if leave empty wiil return #t thanks!

scheme has no statements, expressions. each expression returns value -or may never return-

so want expression not compute much. use nil (or #f, or other value) purpose:

 (cond    ((null? exp)  ())   ....  ) 

if wrote condition test - , no "then" body sub-expressions

 (cond    ((null? exp))  ) 

then result of cond when exp nil result of (null? exp) test #t actually, when exp null, return exp itself.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -