Skip to content

Instantly share code, notes, and snippets.

@pchalamet
Created November 27, 2018 11:08
Show Gist options
  • Save pchalamet/191cd0642f65caf9c0b9bffe544bf1e4 to your computer and use it in GitHub Desktop.
Save pchalamet/191cd0642f65caf9c0b9bffe544bf1e4 to your computer and use it in GitHub Desktop.
error FS0003: This value is not a function and cannot be applied. Why ?
type Vector1(x : float) =
member this.X = x
static member inline (*) (value : float, v : Vector1) =
Vector1(v.X * value)
static member inline (*) (v : Vector1, value : float) =
Vector1(v.X * value)
module Vector =
type Vector1 = { X : float }
let inline (*) (value : float, v : Vector1) =
{ Vector1.X = v.X * value}
let inline (*) (v : Vector1, value : float) =
{ Vector1.X = v.X * value } // error FS0003: This value is not a function and cannot be applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment