Interactive F# Programming: Building a Project with Tips & Examples
DESCRIPTION
Learn how to create a project in F# with tips on variables, redefinition errors, mutability, board setup, and formatting. Discover the importance of single-line statements and printing results in F#.
1 / 3
Télécharger la présentation
Interactive F# Programming: Building a Project with Tips & Examples
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.
Content is provided to you AS IS for your information and personal use only.
Download presentation by click this link.
While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
During download, if you can't get a presentation, the file might be deleted by the publisher.
E N D
Presentation Transcript
CST223 Week 5 Lab • F# Demo • Create a project in F# • Interactive F#
F#: Some Tips • Variables are non-mutable by default: • let x = 3 • let x = 5 <= redefinition error • x = 5 <= not allowed • Can override it with mutable keyboard • let mutable board = [[‘-’;’-’;’-’];[‘-’;’-’;’-’];[‘-’;’-’;’-’]] • board <- (PlacePiece 1 1 ‘X’)
F#: Some tips • Formatting does seem to matter. • Single statement (if/then/else) needs to be on one line. • Use printfn to print out results or use interactive F# window to see results
More Related