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

Viewed 66

What is the difference between using @inlined and using @@inline after a function declaration?

1 Answers

@@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.

Related