> ['a'..'d'] |> System.String.Concat;;
val it : string = "abcd"
IndexerName
属性が付いてますね
<div class="chat-item__username js-chat-item-from">@callmekohei</div>
をhtml
は取り出せる。#r @"./packages/FSharp.Data/lib/net40/FSharp.Data.dll"
open FSharp.Data
module Test_iframe =
let element name ``class`` node =
HtmlNode.name node = name && HtmlNode.attributeValue "class" node = ``class``
HtmlDocument.Load "https://gitter.im/fsugjp/public"
|> HtmlDocument.descendants false ( element "iframe" "" )
|> printfn "%A"
#r @"./packages/FSharp.Data/lib/net40/FSharp.Data.dll"
open FSharp.Data
module Test_iframe =
let element name ``class`` node =
HtmlNode.name node = name && HtmlNode.attributeValue "class" node = ``class``
HtmlDocument.Load "https://gitter.im/fsugjp/public/~chat/#initial"
|> printfn "%A"
> type t = Hoge of int * int;;
type t = | Hoge of int * int
> let tpl = 1, 2;;
val tpl : int * int = (1, 2)
> Hoge tpl;;
val it : t = Hoge (1,2)
> let (Hoge tpl) = it;;
let (Hoge tpl) = it;;
-----^^^^^^^^
stdin(5,6): error FS0019: このコンストラクターには 1 個の引数が適用されていますが、必要なのは 2 個です
enum
の定義としてtype Modes = LightMode | StandardMode | ...
としていますが、これだとenum
ではなく判別共用体(すべてのケースが値を持たない判別共用体)になります。