1
0

Removed tests, as they were somewhat irrelevant.

This commit is contained in:
Jon Michael Aanes 2017-12-02 19:21:46 +01:00
parent 9d375d3d79
commit 2683daf16c
3 changed files with 0 additions and 35 deletions

View File

@ -1,16 +0,0 @@
/* output: 1 */
let
function indentstring (text : string, indent : string) : string =
let var out := indent
var newline_and_indent := concat("\n", indent)
var char := ""
in for i := 0 to size(text) - 1 do
( char := substring (text, i, 1)
; out := concat(out, if char <> "\n"
then char
else newline_and_indent));
out
end
in
indentstring("Hello\nWorld", " ") = " Hello\n World"
end

View File

@ -1,17 +0,0 @@
/* print: |00011110| */
let
function is_whitespace (char:string) : int =
(char = "" | char = "\n" | char = " " | char = "\t")
function testchar(char:string) =
if is_whitespace(char) then print("1") else print("0")
in
testchar("a");
testchar("2");
testchar("321");
testchar("");
testchar("\n");
testchar(" ");
testchar("\t");
testchar("Recursion")
end

View File

@ -1,2 +0,0 @@
/* print: |hello| */
print(concat("", concat("hello", "")))