Scan or not to scan?


#1

In the core 5.1.1 package documentation, I can see the definition of the common functional programming function List.scanl.

But the compiler doesn’t recognise it:

I cannot find a `List.scanl` variable:

The `List` module does not expose a `scanl` variable. These names seem close
though:

Any thoughts?


#2

You’re looking at the documentation for the core package for Elm 0.18. (elm-lang/core)

List.scanl was removed in Elm 0.19 and core was moved to elm/core.
https://package.elm-lang.org/packages/elm/core/latest/List

You can use the scanl function from elm-community/list-extra
https://package.elm-lang.org/packages/elm-community/list-extra/latest/List-Extra#scanl


#3

Thanks for the info.

In general terms, is there any easy way to tell which piece of documentation is 0.18 or 0.19 – is there a cast-iron way to guarantee being on the latest documentation?


#4

Search for package in http://package.elm-lang.org/ - that only shows 0.19 packages.

And there is also https://dmy.github.io/elm-0.18-packages/ for 0.18 packages.


#5

Also, https://package.elm-lang.org/packages/elm-lang/core/latest shows 0.18 documentation, which is the trap I fell into - that is where my bookmark pointed…


#6

Yes, it’s a bit confusing. Both 0.18 and 0.19 packages will be located at http://package.elm-lang.org/packages/… but the search engine at http://package.elm-lang.org only shows 0.19 packages.


#7

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.