he Book of F# 免积分下载

本书介绍F#编程语言,一种在.NET Framework上实现的功能优先编程语言。适合C#和Visual Basic开发者,涵盖默认不变性、流水线操作、类型推断、模式匹配等特性,教授currying、类型创建、数据集处理、并行编程、面向对象开发及数据集操作。

图书说明:

F#将功能优先编程的强大功能引入.NET Framework,这是一个在Microsoft Windows生态系统中开发软件的平台。如果您是C#和Visual Basic的传统.NET开发人员,那么发现F#将会改变您的编码方式,以及您对编码的看法。

在The Book of F#中,Microsoft MVP Dave Fancher分享了他的专业知识,并教你如何利用F#的强大功能来编写简洁,可靠和可预测的代码。当您学习利用默认不变性,流水线操作,类型推断和模式匹配等功能时,您会对代码的高效和优雅感到惊讶。

您还将学习如何:

  • 利用currying,部分应用和委托来利用F#的功能特性
  • 通过记录类型和有区别的联盟简化类型创建和安全性
  • 使用集合类型和模块更有效地处理数据集
  • 使用模式匹配来分解复杂类型并在单个表达式中分支代码
  • 通过并行编程和异步工作流程使您的软件更具响应性
  • 利用面向对象来开发丰富的框架并与使用其他.NET语言编写的代码进行交互
  • 使用查询表达式和类型提供程序来访问和操作来自不同来源的数据集

摆脱那个古老的编程学派。F#书将向您展示如何释放F#的表现力,以创建更智能,更精简的代码

下载地址:he Book of F#

更多免积分电子书,请访问:IE布克斯网

Book Description F# brings the power of functional-first programming to the .NET Framework, a platform for developing software in the Microsoft Windows ecosystem. If you’re a traditional .NET developer used to C# and Visual Basic, discovering F# will be a revelation that will change how you code, and how you think about coding. In The Book of F#, Microsoft MVP Dave Fancher shares his expertise and teaches you how to wield the power of F# to write succinct, reliable, and predictable code. As you learn to take advantage of features like default immutability, pipelining, type inference, and pattern matching, you’ll be amazed at how efficient and elegant your code can be. You’ll also learn how to: Exploit F#’s functional nature using currying, partial application, and delegation Streamline type creation and safety with record types and discriminated unions Use collection types and modules to handle data sets more effectively Use pattern matching to decompose complex types and branch your code within a single expression Make your software more responsive with parallel programming and asynchronous workflows Harness object orientation to develop rich frameworks and interact with code written in other .NET languages Use query expressions and type providers to access and manipulate data sets from disparate sources Break free of that old school of programming. The Book of F# will show you how to unleash the expressiveness of F# to create smarter, leaner code. Table of Contents Chapter 1. Meet F# Chapter 2. F# Interactive Chapter 3. Fundamentals Chapter 4. Staying Objective Chapter 5. Let’s Get Functional Chapter 6. Going to Collections Chapter 7. Patterns, Patterns, Everywhere Chapter 8. Measuring Up Chapter 9. Can I Quote You on That? Chapter 10. Data Access Chapter 11. Asynchronous and Parallel Programming Chapter 12. Compute This! Book Details Paperback: 312 pages Publisher: No Starch Press (March 2014) Language: English ISBN-10: 1593275528 ISBN-13: 978-1593275525
“f - 格式化”通常指的是 Python 中的 f - strings 格式化,这是 Python 一种新的字符串格式化方法。使用时只需在字符串前加上 f,语法格式如下: ```plaintext f '<text> { <expression> <optional !s, !r, or !a> <optional : format specifier> } <text> ... ' ``` 以下是其基本用法和详细示例: ### 基本用法 ```python name = "Tom" age = 3 print(f"His name is {name}, he's {age} years old.") ``` 输出结果为: ```plaintext His name is Tom, he's 3 years old. ``` ### 格式占位符的使用 #### 1. 实现进制(或格式)的转换与冒号 `:` ```python num = 10 print(f"The decimal number {num} in hexadecimal is {num:x}") ``` #### 2. 实现对象的字符串形式转换与感叹号 `!` ```python obj = [1, 2, 3] print(f"The repr form of the object is {obj!r}") ``` #### 3. 为对象指定宽度或精度 ```python pi = 3.1415926 print(f"Pi rounded to 2 decimal places is {pi:.2f}") ``` #### 4. 对对象取百分比 ```python percentage = 0.25 print(f"The percentage is {percentage:.2%}") ``` #### 5. 为对象增加正号 `+` 或负号 `-` ```python positive_num = 5 negative_num = -5 print(f"The positive number: {positive_num:+d}, the negative number: {negative_num:d}") ``` #### 6. 为对象增加标志(flags) ```python num = 10 print(f"Number with leading zeros: {num:05d}") ``` ### 日期、时间格式使用 ```python import datetime now = datetime.datetime.now() print(f"Current time is {now:%Y-%m-%d %H:%M:%S}") ``` ### 结合字典使用 ```python book = {'name': '爬虫教程', 'price': 29, 'publish': '人民出版社'} print(f"书名是:{book['name']}, 价格是:{book['price']:010.2f}, 出版社是:{book['publish']}") ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值