Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 844137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:14:20+00:00 2026-05-15T06:14:20+00:00

This code isn’t compiling for me: let countDown = [5L .. −1L .. 0L];;

  • 0

This code isn’t compiling for me: let countDown = [5L .. −1L .. 0L];;

I have a book (page 33) 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];;
  -----------------------^

The book’s wrong. but why? is it an update to the language? what is the way to achieve that?

Edit: the problem was that the − character copied from the PDF, isn’t the - character.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:14:21+00:00Added an answer on May 15, 2026 at 6:14 am

    Your original code works fine for me even without the modifications that Igor suggested:

    Microsoft (R) F# 2.0 Interactive build 4.0.30319.1
    Copyright (c) Microsoft Corporation. All Rights Reserved.
    
    > let l = [ 10L .. -1L .. 0L ];;
    val l : int64 list = [10L; 9L; 8L; 7L; 6L; 5L; 4L; 3L; 2L; 1L; 0L]
    

    A possible subtle error is that if you (for example) pasted the code from Word (or some other program), it may have replaced the - symbol with some other type of dash that looks the same, but has actually a different code.

    Another way to break the code is to remove some spaces – for example, there must be a space between .. and -1L. Otherwise, I don’t see any reason why it shouldn’t work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 536k
  • Answers 536k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This code should accomplish this $( ".selector" ).accordion({ active: false… May 17, 2026 at 1:24 am
  • Editorial Team
    Editorial Team added an answer It seems the :git param you're providing is causing bundler… May 17, 2026 at 1:24 am
  • Editorial Team
    Editorial Team added an answer Have you tried overriding HttpEntityEnclosingRequestBase as follows: import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; import… May 17, 2026 at 1:24 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

And of course I want to do this code-wise. It's not that there isn't
This code isn't for anything in particular. I'm just trying to successfully get the
This code isn't working. It doesn't raise an exception or even do anything visible.
I'm making a Pascal's triangle and I can't figure out why this code isn't
I have this code in my HTML form: <form action=cart.php method=post> <input type=hidden value=1
I'm not sure why this code isn't working. Its not going to the copy
I have this code: def random_answerlist(self): self.li = [] self.winning_button = random.randint(0, 3) i
When I run this code the page repeats its self. I also need it
Can anyone point out the flaw in this code? I'm retrieving some HTML with
I'm not sure why my code isn't doing the TextWrapping properly. It doesn't wrap

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.