F# - This code isn't compiling for me
        Posted  
        
            by stacker
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by stacker
        
        
        
        Published on 2010-06-07T02:26:11Z
        Indexed on 
            2010/06/07
            2:42 UTC
        
        
        Read the original article
        Hit count: 349
        
F#
This code isn't compiling for me:  let countDown = [5L .. -1L .. 0L];;
I have a book that says it should return this:
val countDown : int list = [5L; 4L; 3L; 2L; 1L; 0L]
Compiler Error:
Program.fs(42,24): error FS0010: Unexpected character '-' in expression
>
> let countDown = [5L .. -1L .. 0L];;
  let countDown = [5L .. -1L .. 0L];;
  -----------------------^
© Stack Overflow or respective owner