print + build partially tested

This commit is contained in:
ProgramSnail 2023-04-02 15:10:32 +03:00
parent 0d62ae0814
commit 15e36c203a
22 changed files with 179 additions and 116 deletions

View file

@ -1,7 +1,6 @@
namespace Employee {
decl gen_employee : Unit -> Employee
def gen_employee = {
; a = b + c
return
$Employee
& name = "John"

View file

@ -18,14 +18,13 @@ def fact : n =
decl find_prefix_hashes ('H : (#AccHash Char)) : String -> Array 'H
def find_prefix_hashes ('H : (#AccHash Char)) : str = {
var hashes = (Array 'H).new (str.size + 1)
; hashes.0 = 'H.of str.0
for i in 1..hashes.size do {
; hashes.i = hashes.(i - 1).clone
; hashes.i.append str.i
}
for i in 1..hashes.size do {
; hashes.i = hashes.(i - 1).clone
; hashes.i.append str.i
}
return hashes
return hashes
}
// ?? other default constructor symbol (instead of placeholder _), etc. ??
@ -68,3 +67,4 @@ decl mul_10 : Int -> Int
def mul_10 = mul 10 // or argument can be used
// ?? is partial application feature needed ??