[erlang-questions] Erlang documentation
Richard A. O'Keefe
ok@REDACTED
Thu Sep 22 03:04:31 CEST 2016
From the link that Roger Lipscome wrote, it sounds as though
Google are doing "passage retrieval" within a page. That means
that if you want a subpart of a page to be linked from the
snippet, it's not something you do in the *page*, it's something
you do in the *query*. You have to provide lots of keywords that
are likely to be specific to the part you want. I tried
Erlang list apply function concatenate results of map
and flatmap showed up in the snippet just as I wanted, but
there was no link in the snippet.
Now that Erlang has function type specs,
https://www.haskell.org/hoogle/
becomes of potential interest.
Hoogle is a Haskell API search engine,
which allows you to search many standard
Haskell libraries by either function name,
or by approximate type signature.
For example, searching for
(x -> [y]) -> [x] -> [y]
in Hoogle comes back with concatMap at the top of the list,
clicking on it takes you to the entry for concatMap, which
actually says
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
[Source]
Map a function over all the elements of a container
and concatenate the resulting lists.
The [Source] box is a link to the current source code.
While Haddock + Hoogle is pretty cool, it could do with examples.
I really should make more use of erldocs.
More information about the erlang-questions
mailing list