This commit is contained in:
NikolajDanger
2022-04-30 16:18:13 +02:00
parent 2465cf84b7
commit b9ef4bb00e
174 changed files with 20605 additions and 100 deletions

11
W1/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)