mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-05 22:48:43 +00:00
or references, prining improvements, comments now printed, fixes
This commit is contained in:
parent
73263193a9
commit
5e70f0015f
19 changed files with 354 additions and 429 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue