As you saw in Chapter 3, you can use F# for pure functional programming. However, some issues, most notably I/O, are almost impossible to address without some kind of state change. F# does not require that you program in a stateless fashion. It allows you to use mutable identifiers whose values can change over time. F# also has other constructs that support imperative programming. You saw some in Chapter 3. Any example that wrote to the console included a few lines of imperative code alongside functional code. In this chapter, you’ll explore these ...
© Robert Pickering and Kit Eason 2016
Robert Pickering and Kit Eason, Beginning F# 4.0, 10.1007/978-1-4842-1374-2_4
4. Imperative Programming
Robert Pickering1 and Kit Eason
(1)St. Germain-En-Laye, France
Get Beginning F# 4.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.