Clojure Loop Multiple Return Values

Clojure Loop Multiple Return Results

[quads id=8]

Hi! Here I shows you How to Return Multiple Values from a Loop in Clojure Language.

And to achieve a Multi Result return you have simply to enclose them into a Vector.

Featured
  1. Clojure Multiple Return from Loop

    So here is the simple General Form
    First, of course them has to be declared on the Loop like:

    loop [iterator x
             first-item [FIRST-STARTVALUE]
             second-item [SECOND-STARTVALUE]
             ...]
    
    To put them into a Vector like for instance:
    [first-item second-item]

Leave a Reply

Your email address will not be published. Required fields are marked *