1

F# の入門ドキュメントに取り組もうとしています Visual Studio Code でエラーが表示 されるここ

赤い波線の上にマウスを置くと、エラー メッセージが表示されます

The Namespace or module ClassLibraryDemo is not defined"

ClassLibaryDemo.fs のコードは次のとおりです。

namespace ClassLibraryDemo

module PigLatin =
    let toPigLatin (word: string) =
        let isVowel (c: char) =
            match c with
            | 'a' | 'e' | 'i' |'o' |'u'
            | 'A' | 'E' | 'I' | 'O' | 'U' -> true
            |_ -> false

        if isVowel word.[0] then
            word + "yay"
        else
            word.[1..] + string(word.[0]) + "ay"
4

1 に答える 1