When do you put double semicolons in F#?

前端 未结 9 1193
孤独总比滥情好
孤独总比滥情好 2021-01-01 09:39

This is a stupid question. I\'ve been reading a couple books on F# and can\'t find anything that explains when you put ;; after a statement, nor can I find a pattern in the

9条回答
  •  [愿得一人]
    2021-01-01 10:08

    Symbol and Operator Reference (F#)

    http://msdn.microsoft.com/en-us/library/dd233228(v=VS.100).aspx

    Semi Colon:

    •Separates expressions (used mostly in verbose syntax).

    •Separates elements of a list.

    •Separates fields of a record.

    Double Semi Colon:

    http://www.ffconsultancy.com/products/fsharp_journal/free/introduction.html

    Articles in The F#.NET Journal quote F# code as it would appear in an interactive session. Specifically, the interactive session provides a > prompt, requires a double semicolon ;; identifier at the end of a code snippet to force evaluation, and returns the names (if any) and types of resulting definitions and values.

提交回复
热议问题