(=>)=(,)是什么意思?

时间:2016-10-14 18:02:57

标签: elm

在Elm的mouse drag示例中定义了(=>) = (,),以便以这种方式定义列表:

style [ "background-color" => "#67BF46"    , "cursor" => "move" ]

我更习惯于:

style [ ( "background-color" , "#67BF46" ) , ( "cursor" , "move" ) ]

这些是等价的吗?对我来说,这看起来更像record,但即便如此。

1 个答案:

答案 0 :(得分:2)

是的,它们是等价的。该库只是定义了一个他们认为比使用元组语法更漂亮的中缀函数public static class ActiveProcedure extends CompletableFuture<String> { @Getter String command; public ActiveProcedure(String command) { this.command = command; } }

相关问题