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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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