Skip to content

Allow to return values from dolist, dotimes and do-symbols#389

Open
Affonso-Gui wants to merge 1 commit into
euslisp:masterfrom
Affonso-Gui:return-dolist
Open

Allow to return values from dolist, dotimes and do-symbols#389
Affonso-Gui wants to merge 1 commit into
euslisp:masterfrom
Affonso-Gui:return-dolist

Conversation

@Affonso-Gui
Copy link
Copy Markdown
Member

Partially solves #241

It is not as complete as the gist solution on the discussion, but is done with minimal changes and is sufficient for cases when the return value is omitted.

(dolist (i (list 1 2 3))
  (print i)
  (return t))
1
t

Remains the same (= different from cl) when the return value is explicitly given:

(dolist (i (list 1 2 3) 10)
  (print i)
  (return t))
1
10

@k-okada
Copy link
Copy Markdown
Member

k-okada commented Jun 19, 2019

Thank you for contributing EusLisp documentation

Please check latest documents before merging

PDF version of English manual: manual.pdf
PDF version of Japanese jmanual: jmanual.pdf
HTML version of English manual: manual.html
HTML version of Japanese manual: jmanual.html
Sphinx (ReST) version of English manual: manual.rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants