4

Websharper のオンラインの例を熟読しているときに、次のような例に出くわしました。

Div [Attr.Style "padding: 5px;"] -< [
    P [Text "Type a name in the input field below:"]
    Form [
        label "First Name: "
        input
        |>! OnKeyUp (fun _ _ -> update ())
    ]
    P [
        label "Suggestions: "
        hint
    ]
]

計算式には含まれていないようで、何らかの理由で の意味を Google で調べるのは特に簡単ではありません|>!

!このコンテキストでモディファイアはどのような効果がありますか? forward パイプの結果はどのように変化しますか?

4

1 に答える 1

2

謎が解けました。これはネイティブの F# 演算子ではありません。それは Webshaper オペレーターです。

ソースコードから ( https://github.com/intellifactory/websharper/blob/master/src/stdlib/WebSharper.Main/Pervasives.fs#L105 ):

/// Implements piping with mutation.
[<Inline "($f($x), $x)">]
let ( |>! ) x f = f x; x
于 2014-04-27T15:27:09.007 に答える