我从书中尝试此代码但遇到错误,有人可以帮我吗?查找字符串中的单词的简单代码
#if INTERACTIVE
#r "FSharp.PowerPack.dll";;
#r "FSharp.PowerPack.Compatibility.dll";;
#endif
open System
open System.IO
open System.Collections.Generic
open Microsoft.FSharp.Collections.Tagged
let str = "This is a string, try to break it buddy!\nfind!"
let isWord (words) =
let wordTable = Set.Create(words)
fun w -> wordTable.Contains(w)
为Set.Create
编译器说:
多种类型存在所谓的 '设置',以通用参数的不同的号码。提供一个类型实例化来消除类型分辨率,例如'设置< _>'。
这是什么意思?
标题是一个*小*误导.. – Mehrdad 2011-04-03 05:37:13