Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 2 ranges are not expanded. #41

Open
driv opened this issue Nov 16, 2016 · 2 comments
Open

Chapter 2 ranges are not expanded. #41

driv opened this issue Nov 16, 2016 · 2 comments

Comments

@driv
Copy link

driv commented Nov 16, 2016

I'm testing on the latest official docker image which uses 0.5.0.

I'm currently obtaining this result:

julia> a = [0:10]
1-element Array{UnitRange{Int64},1}:
 0:10

Instead of what is shown on the tutorial:

julia> [0:10]
    11-element Array{Int64,1}:
      0
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10

To obtain the same result I have to collect the range:

julia> a = collect(0:10)
11-element Array{Int64,1}:
  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
@driv
Copy link
Author

driv commented Nov 16, 2016

Is it safe to assume that the tutorial should work with the latest version?

@chrisvoncsefalvay
Copy link
Owner

@driv The tutorial was written pre-Arraypocalypse. So you're perfectly right - you now have to collect() ranges. It is my intention to fix this, along with most of the changes and novations that the Arraypocalypse has introduced. I'll keep this issue open pending the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants