idea project + task1 fib_P + tests (passed)
This commit is contained in:
parent
862b327b81
commit
058a522263
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="ERLANG_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="erlang" name="Erlang">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Erlang 25" jdkType="Erlang SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,7 @@
|
|||
-module(fib).
|
||||
-export([fib_p/1]).
|
||||
|
||||
% Сопоставление с образцом
|
||||
fib_p(0) -> 0;
|
||||
fib_p(1) -> 1;
|
||||
fib_p(N) -> fib_p(N - 1) + fib_p(N - 2).
|
|
@ -0,0 +1,13 @@
|
|||
%%%-------------------------------------------------------------------
|
||||
%%% @author ivan
|
||||
%%% @copyright (C) 2023, self
|
||||
%%% @doc
|
||||
%%%
|
||||
%%% @end
|
||||
%%% Created : 09. Feb 2023 23:52
|
||||
%%%-------------------------------------------------------------------
|
||||
-module(fib_test).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
simple_test() ->
|
||||
?assert(true).
|
Loading…
Reference in New Issue