我從書中嘗試此代碼但遇到錯誤,有人可以幫我嗎?查找字符串中的單詞的簡單代碼
#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