While or For Loop in function #2524
Answered
by
cpitclaudel
dreamqin68
asked this question in
Q&A
-
Hi All, What is the correct way to use Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
cpitclaudel
Aug 1, 2022
Replies: 3 comments 2 replies
-
Hi there,
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dreamqin68
-
Okay, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
-
This point also argues for having a library of stream functions in Dafny -- they can stand in for many loops |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
while
andforall
statements are not supported in functions — in fact, no statements are! Function bodies can only use expressions (that and the fact that methods are opaque are the main differences between functions and methods).