Learn how to model possibly unavailable data items using option types, and the some and none syntax.
- [Instructor] We're in the last lap now of our F# recap,…and were going to look at option types.…Options types are incredibly important in F#.…They're kind of F#'s reason for…claiming that you can't get null value exceptions in F#.…That's not really true.…It's quite easy, in fact, to write an F# program…that does experience a null reference exception.…But if you write in an idiomatic way,…then you can mainly avoid them,…and that means making good use of option types.…So concentrate now on the bottom of the screen,…and I'm going to just remind you how we…bound the value of X.…
Before, we just said that X equals 42.…But what if we might not know a value for X.…Then we're going to use an option type,…and we're going to force X to be…an option of integer.…In other words, if it has a value,…it's going to be an integer,…but we might not have value for it.…And we can still assign 42 to it,…but we need to wrap the 42 in a keyword Some.…And that simply means,…"Yes, I do have value for this optional type."…Likewise, if we don't have a value for X,…
- Defining values and calling functions in F#
- Defining and identifying discriminated unions
- Working with if-else expressions
- Writing unit test
- Using type providers to access data
- Analyzing data with collection functions
- Plotting data using the R type provider
- Using railway-oriented programming to handle errors
- Integrating with Twitter
- Deploying an F# application to Azure
Skill Level Intermediate
1. Get Started with F#
2. Build a Simple Parser with Unit Testing
3. Use F# CSV Type Provider to Get Data
4. Analyze Data with F# Collection Functions
5. Use RStats Provider and ggplot2 to Plot Data
6. Use BoxKite with Twitter
7. Deploy a Working Bot
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.