added the 'fun' symbol as an alias to 'lamba'
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
20
t/fun-01.hcl
20
t/fun-01.hcl
@ -6,12 +6,18 @@ defun aaa(a b) {
|
||||
|
||||
set k (aaa 10 20);
|
||||
|
||||
if (= k 30) {
|
||||
printf "OK\n";
|
||||
}
|
||||
else {
|
||||
printf "ERROR\n";
|
||||
if (= k 30) { printf "OK\n"; }
|
||||
else { printf "ERROR\n"; };
|
||||
|
||||
## --------------------------------------
|
||||
|
||||
defun mkfun(t) {
|
||||
return (fun(c) {
|
||||
return (+ t c);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
set f (mkfun 20);
|
||||
set k (f 50);
|
||||
if (= k 50) { printf "OK\n"; }
|
||||
else { printf "ERROR\n"; };
|
||||
|
Reference in New Issue
Block a user