mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
print + build partially tested
This commit is contained in:
parent
0d62ae0814
commit
15e36c203a
22 changed files with 179 additions and 116 deletions
|
|
@ -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 ??
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue