I've been learning lisp
at university recently and I'm having some problems adapting to this language.
Does let
in this language work as a for in java? If so can you show me an example that gives you a rough idea of how it works?
I've been learning lisp
at university recently and I'm having some problems adapting to this language.
Does let
in this language work as a for in java? If so can you show me an example that gives you a rough idea of how it works?
This link contains a wealth of information about this language. Including an explanation of interactions, in section 2.19 you can see how to create a loop
that would be equivalent to for
in java.
Example:
Printing numbers from 10 to 20.
(loop for a from 10 to 20
do (print a)
)
The code above is equivalent to the following code in java:
for(int i = 10; i <= 20; i++){
System.out.println(i);
}