Structuring Julia Project

Here is the code peiced together with the includes removed

module Maths
	function abs_value(x)
    	return x>0 ? x : -x
	end
end

module Algebra
	import ..Maths
	function add_value(x)
    	return Maths.abs_value(x)+5
	end
end

print(Maths.abs_value(-98))

Notice that ive changed .Maths to ..Maths because its in a parent module

1 Like