简体   繁体   中英

What is the difference between @inlined and @@inline in OCaml?

在函数声明之后使用 @inlined 和使用 @@inline 有什么区别?

@@inline is attached to a function or functor declaration while @inlined is attached to a function application.

let add x y = x + y [@@inline]
let z = (add[@inlined]) 1 2

You should refer this for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM