Current section
Files
Jump to
Current section
Files
stdlib/Foreign/Maybe.erl
%%---------------------------------------------------------------------------
%% |
%% Module : Maybe
%% Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd.
%% License : BSD-style (see the LICENSE file)
%%
%% Maintainer : Feng Lee, feng@emqx.io
%% Yang M, yangm@emqx.io
%% Stability : experimental
%% Portability : portable
%%
%% The Maybe module.
%%
%%---------------------------------------------------------------------------
-module('Foreign.Maybe.FFI').
-include("Maybe.hrl").
-export(['maybe'/1]).
'maybe'(undefined) -> ?Nothing;
'maybe'(Val) -> ?Just(Val).