or references, prining improvements, comments now printed, fixes

This commit is contained in:
ProgramSnail 2023-07-31 22:07:32 +03:00
parent 73263193a9
commit 5e70f0015f
19 changed files with 354 additions and 429 deletions

View file

@ -151,15 +151,16 @@ bubble_sort_2 'arr : ref Array['A] = {
& @key Key
& @value Value
& @left ^TreeNode['Key 'Value]
& @right ^TreeNode['Key 'Value] {
new = do_something; // static methods
& @right ^TreeNode['Key 'Value];
$insert 'key = do_something; // const methods
.new = do_something; // static methods
%find 'key = do_something;
.insert <> 'this 'key = do_something; // const methods
.find 'this 'key = do_something;
.delete <> 'this 'key = do_something; // var methods
$delete 'key = do_something; // var methods
}
generic_type_name_expressions = {
$x := TreeNode[Int Int].new;
@ -199,9 +200,8 @@ move_construct_task 'name 'duration : <- String <- Float -> Task = Task @name 'n
arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name 'duration;
: ord is fundamental typeclass
#Ord : #Eq {
$is_less_then : Ord -> Bool;
}
#Ord[#Eq];
.is_less_then : Ord -> Bool;
: function, that takes result argument
result_example 'a! = 'a =: _? => print "value inside"