Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0508-docs-add-note-about-anonymous-type-variabl...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0508-docs-add-note-about-anonymous-type-variables.patch of Package erlang
From 03cfb72b67b14cf370179fe963ce07cfa0322e0e Mon Sep 17 00:00:00 2001 From: Kiko Fernandez-Reyes <kiko@erlang.org> Date: Mon, 10 Oct 2022 08:23:49 +0200 Subject: [PATCH] docs: add note about anonymous type variables --- system/doc/reference_manual/typespec.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml index 03a83680a8..9ab409b7ac 100644 --- a/system/doc/reference_manual/typespec.xml +++ b/system/doc/reference_manual/typespec.xml @@ -607,5 +607,14 @@ of the following form: </p> <pre> -spec my_error(term()) -> no_return().</pre> + + <note> + <p>Erlang uses the shorthand version <c>_</c> as an anonymous type variable + equivalent to <c>term()</c> or <c>any()</c>. For example, the following function + <pre> -spec Function(string(), _) -> string().</pre> + is equivalent to: + <pre> -spec Function(string(), any()) -> string().</pre> + </p> + </note> </section> </chapter> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor