News for hackers. Stuff that matters.
Re:Reason: A new interface to OCaml by LeonidasXIV on Wednesday May 18, 2016 @04:35AM (#11720553)
Can be shortened to

    let (|>) x f = "%apply"
which utilises some language magic and is probably faster.
Re:Reason: A new interface to OCaml by thedufer on Wednesday May 18, 2016 @11:27PM (#11727747)
At risk of being pedantic, that's actually shorter. It also doesn't work, at least on the version of OCaml I'm familiar with. In order to invoke that particular bit of "language magic", you'd have to declare it external and explicitly give its type:

    external (|>) : 'a -> ('a -> 'b) -> 'b = "%revapply"
Also, `%apply` is usually the `@@` operator. For `|>`, one would expect `%revapply`.