Transfer commit

This commit is contained in:
2023-03-21 19:36:40 +00:00
parent 180ebb56fa
commit f3ce910f66
63 changed files with 1410 additions and 1023 deletions

View File

@@ -1,3 +1,4 @@
import prelude::*
import std::conv::(parse_float, to_string)
import std::cpsio::(readline, print)
import std::str::(concatenate)
@@ -10,10 +11,10 @@ export main := do{
cps data = readline;
let b = parse_float data;
let result = (
if op = "+" then a + b
else if op = "-" then a - b
else if op = "*" then a * b
else if op = "/" then a / b
if op == "+" then a + b
else if op == "-" then a - b
else if op == "*" then a * b
else if op == "/" then a / b
else "Unsupported operation" -- dynamically typed shenanigans
);
cps print (to_string result ++ "\n");