This commit is contained in:
NikolajDanger
2022-05-15 12:54:29 +02:00
parent 383332077b
commit ba22cff91f
222 changed files with 23320 additions and 0 deletions

11
W2/fasto/tests/ordchr.fo Normal file
View File

@ -0,0 +1,11 @@
fun char read_char(int i) = read(char)
fun [char] read_string(int n) = map(read_char, iota(n))
fun int add_one(int x) = x + 1
fun [char] main() =
let n = read(int) in
let s1 = read_string(n) in
let s2 = map(chr, map(add_one, map(ord, s1))) in
write(s2)