TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

F#: Lists - The Basics

5 点作者 polar大约 17 年前

1 comment

marketer大约 17 年前
Unfortunately, lists only exist in the pure F# model (ocaml-compat). They don't implement ICollection, and this is required to use lists in most conceivable .net libraries. To get a list that implements ICollection, you need to use sequences.<p>Sequences are more of a pain, because type inference is a lot more restrictive on them, and they really don't play nicely with polymorphism. You can convert lists to sequences, and vice-versa, but this gets annoying after a while.<p>In short, F# lists are cool, but you hardly ever use them in real code.