An experimental programming language.
@std;$struct,{|import;"std"}
@print;$fn,:std.print
/// This function does something
@do_something;{$fn;{
@x;$num
@y;$num
@z;$num
@s;$str
},$num},{
!:^print;:_.x,:_.y,:_.z,:_.s
// blocks implicitly return the result of the last meta operation
#+;:_.x,:_.y,:_.z
}
@Storage;$type,{$struct;{
@stored;$num
@capacity;$num
}}
@main;{$fn;{},$void},{
@storage;$:^Storage
~:storage.stored;-10.0
~:storage.capacity;100
@result;$num
~result;{!:^do_something;:.storage.stored,:.storage.capacity,100,"Hello, world!"}
!:^print;:storage.stored
!:^print;:storage.capacity
?{#=;:.result,100};{
!:^print;"Result is 100"
},{
!:^print;"Result is not 100"
}
@i;$num,0
%{#<;:.i,100};{
!:^print;:.i
~:.i;{#+;:..i,1}
}
?{#>;:.result,100};{
!:^print;"Result is greater than 100"
},{
!:^print;"Result is not greater than 100"
}
}