Scan or not to scan?

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

Any thoughts?

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.

You can use the scanl function from elm-community/list-extra

1 Like

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?

Search for package in - that only shows 0.19 packages.

And there is also Elm 0.18 packages for 0.18 packages.

Also, shows 0.18 documentation, which is the trap I fell into - that is where my bookmark pointed…

Yes, it’s a bit confusing. Both 0.18 and 0.19 packages will be located at… but the search engine at only shows 0.19 packages.

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