You can define your own operators in F#:

1
2
3
4
let (..-) x y = -(x * y)
let a = 3 
let r = [a..-1..2]
printfn "%A" r

which means that you need to use more whitespace or parens to disambiguate cases where 'a bunch of operator symbols run together' are not to be treated as a single operator.

By on 11/15/2008 11:19 AM ()

Heh. Also:

1
2
3
4
> let a = 3 in [a.. -1 ..2];;

val it : int list = [3; 2]
By on 11/15/2008 10:59 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper