-
-
Save johnfoconnor/6503f2e617fc65b48934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(my_behaviour) | |
-export_type([my_data_type/1]). | |
-type my_data_type(Type) :: {ok, Type} | {error, atom()}. | |
-callback my_custom_function() -> my_data_type(term()). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(my_impl) | |
-behaviour(my_behaviour) | |
-record(my_record, {}). | |
-spec my_custom_function() -> my_behaviour:my_data_type(#my_record{}). | |
my_custom_function() -> | |
#my_record{}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment