This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type C: | |
App {~x, ~y} | |
S | |
K | |
I | |
String/concat (String/Nil) str = str | |
String/concat (String/Cons c rest1) str2 = (String/Cons c (String/concat rest1 str2)) | |
String/join List/Nil = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run with this command: $ hvm1 run -f ski.hvm1 -t 1 "(Main)" | |
// HVM1 has a bug on the parallelizer (that's what HVM2 fixed) so you need to run with -t 1 | |
// expected output: | |
// "norm: ((((s ((s s) s)) s) (s s)) k)" | |
// "norm: (((s ((s s) s)) s) (s s))" | |
// "norm: ((s ((s s) s)) s)" | |
// "norm: (s ((s s) s))" | |
// "norm: ((s s) s)" | |
// "norm: (s s)" | |
// "norm: (s s)" |